Wrong output indentation in all messages if one message has a long multiline quote
See original GitHub issueWhat version of ESLint are you using?
2.11.1
What parser (default, Babel-ESLint, etc.) are you using?
default
Please show your full configuration:
{
"root": true,
"extends": [
"eslint:recommended",
"airbnb-base"
],
"parserOptions": {
"ecmaVersion": 7,
"sourceType": "script"
},
"env": {
"browser": false,
"es6": true,
"node": true
},
"rules": {
"arrow-parens": [2, "as-needed"],
"eqeqeq": 2,
"key-spacing": [2, { "beforeColon": false, "afterColon": true, "mode": "minimum" }],
"no-console": 0,
"no-eq-null": 2,
"no-extra-parens": [2, "all"],
"no-multi-spaces": 0,
"no-unused-vars": 2,
"no-use-before-define": [2, { "functions": false }],
"quotes": [2, "single"],
"spaced-comment": [2, "always", { "exceptions": ["/", "*"] }],
"strict": [2, "global"],
"unicode-bom": [2, "always"]
}
}
What did you do? Please include the actual source code causing the issue.
const http = require('http');
http.request({
// Param
// Param
// Param
}).on('response', response => {
// Do something with response.
// Do something with response.
// Do something with response.
// Do something with response.
// Do something with response.
// Do something with response.
// Do something with response.
// Do something with response.
// Do something with response.
// Do something with response.
}).on('error', error => {
// Do something with error.
// Do something with error.
// Do something with error.
// Do something with error.
// Do something with error.
// Do something with error.
// Do something with error.
// Do something with error.
// Do something with error.
// Do something with error.
}).end();
What did you expect to happen?
An output with readable indentation and alignment.
What actually happened? Please include the actual, raw output from ESLint.
Compare with the output after the last error fixed:
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Poor handling of multi-line string literals using slash continuation
Make a small Python file containing the following: if True: # Pointless if-statement just for indentation here: print("\ \nMESSAGE - printing a ...
Read more >CMake multiline message with FATAL_ERROR - Stack Overflow
It goes to stderr. Formatted lines will" " be indented an additional 2 spaces beyond what was provided in the output" " string....
Read more >Here documents, or how to create multi-line strings in Perl
A here-document allows you to create a string that spreads on multiple lines and preserves white spaces and new-lines. If you run the ......
Read more >[Review] SE-0168: Multi-Line String Literals - Swift Forums
For instance, if one line used a tab and other lines used spaces, Swift would not strip indentation from any of the lines;...
Read more >YAML Superpowers, part 2: Multiline Strings
When you use single quotes '' , the string won't be escaped. This means that every character will be interpreted verbatim – including...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It looks like a bug that we should fix. However, I don’t think we should fix formatter itself, but instead we should modify
newline-per-chained-call
to not dump that much information into the error message.Ah OK. Default allows 2 chained and disallows 3rd and later.