Indention failures after operator linebreaks
See original GitHub issueMy environment:
- ESLint Version:
- Node Version: 10.15.3
- npm Version: 6.9.0
Parser version: default
Configuration
{
"env": {
"es6": true,
"mocha": true,
"mongo": true,
"node": true
},
"globals": {},
"rules": {
"indent": [
2,
4,
{
"SwitchCase": 1,
"CallExpression": {
"arguments": 1
}
}
],
"operator-linebreak": [
2,
"after",
{
"overrides":
{
"?": "before",
":": "before"
}
}
]
}
}
test('Error occurs only when use new line after operator. ' +
'Here is new line.',
log);
eslint /path/to/test.js
I expect eslint check will succeed. Actually it fails with error:
/path/to/test.js
3:1 error Expected indentation of 0 spaces but found 4 indent
✖ 1 problem (1 error, 0 warnings)
1 error and 0 warnings potentially fixable with the `--fix` option.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
If you break long code lines, how do you indent the stuff on the ...
Operators at the end of each line instead of the beginning of subsequent lines, to very clearly indicate visually that the line is...
Read more >Newline after logical operators chooses a bad line break
Steps to reproduce: Write the following code: df <- data.frame(col1 = 1:10) df[ col1 < 5 & ] Put the typing focus where...
Read more >How to avoid automatic indents after \input caused by a ...
The linebreak \\ after "Second (long) paragraph." causes an automatic indent in the subsequent line "Third (long) paragraph." as one can see in ......
Read more >Best practice for avoiding line break bugs in long expressions
Your editor should indent correctly, and that can serve as a warning. That said, the best practice is to avoid expressions spanning multiple ......
Read more >3 Presentation Markup
MathML conveys this meaning by using the ⁡ operator after the " f " ... elements control linebreaking and indentation of the following...
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
@kaicataldo, done
Unfortunately, it looks like there wasn’t enough interest from the team or community to implement this change. While we wish we’d be able to accommodate everyone’s requests, we do need to prioritize. We’ve found that issues failing to reach accepted status after 21 days tend to never be accepted, and as such, we close those issues. This doesn’t mean the idea isn’t interesting or useful, just that it’s not something the team can commit to.
Thanks for contributing to ESLint and we appreciate your understanding.