indent expects wrong indentation for logical/arithmetic expressions
See original GitHub issueWhat version of ESLint are you using?
3.1.1
What parser (default, Babel-ESLint, etc.) are you using?
default
Please show your full configuration:
indent: [
'error',
4,
{
SwitchCase: 1
}
]
What did you do? Please include the actual source code causing the issue.
(function() {
var x = 0 ||
{
a: 1,
b: 2
};
var y = x ||
true;
})();
What did you expect to happen?
I expected it not to have an error about the indentation on lines 3-6
What actually happened? Please include the actual, raw output from ESLint.
/home/user/test.js
3:13 error Expected indentation of 4 space characters but found 8 indent
4:17 error Expected indentation of 8 space characters but found 12 indent
5:17 error Expected indentation of 8 space characters but found 12 indent
6:13 error Expected indentation of 4 space characters but found 8 indent
8:9 error 'y' is defined but never used no-unused-vars
✖ 5 problems (5 errors, 0 warnings)
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Indentation Error in Python | How to Solve it - Edureka
This article will provide you with a detailed understanding of Indentation error in Python and the solutions to avoid the same.
Read more >How does Indentation Error Work in Python? - eduCBA
This will help you in understanding which line contains the error or does not have the expected whitespaces. Python arranges all lines of...
Read more >Indentation in Python - GeeksforGeeks
To indicate a block of code in Python, you must indent each line of the block by the same whitespace. The two lines...
Read more >Optional Braces - Scala 3 - EPFL
Optional Braces · First, some badly indented programs are flagged with warnings. · Second, some occurrences of braces {...} are made optional. Generally,...
Read more >I'm getting an IndentationError. How do I fix it? - Stack Overflow
However, if you are sure the line does need to be indented, the indentation needs to match that of a former statement in...
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
@alecharmon We would definitely appreciate a pull request for this issue. However, keep in mind, this is most likely part of the multiline issue with indent rule, which is much larger. You can search open issues for other reports related to multiline indentation problems.
code is ready for a pr, will work on getting that up tomorrow