Indent rule bug in arrays when first value has indent
See original GitHub issueESlint config:
"indent": [
2,
4
],
Current behavior:
Code 1:
var a = [
'a',
'b'
];
Error: “Expected indentation of 12 space characters but found 16 (indent).”
Code 2:
var a = ['a',
'b'
];
Error: None
Expected behavior:
Both options don’t throw any error as for JSHint option "indent": 4
as described on http://eslint.org/docs/rules/indent.html#compatibility
Other ESlint version: 1.6.0
<bountysource-plugin>
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>
Issue Analytics
- State:
- Created 8 years ago
- Comments:15 (13 by maintainers)
Top Results From Across the Web
PhpStorm array indentation 8 spaces in stead of 4
The problem still persists though, in some files arrays just indent with 8 spaces. If I then reformat the code, it returns to...
Read more >indent - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >enforce consistent indentation (indent-legacy) - ESLint
This rule enforces a consistent indentation style. The default style is 4 spaces . Options. This rule has a mixed option: For example,...
Read more >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 >Indent the first line of a paragraph - Microsoft Support
When you press Enter to start the next paragraph, its first line will be indented. Tip: If you want to change indentation for...
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
@sstern6 Thanks for all your efforts. I wont be able to reply for few days as i workin on some critical issue at work. Just wanted to let u know. Posting this message without reading the whole thread. Sorry buddy but I will be back (Thanks for understanding). Again I want to thank u for all ur efforts.
@ilyavolodin @gyandeeps thanks will probably have this up by mid to end of this coming week. Will definitely have questions for you!
Thank you