Indent rule doesn’t validate multiline expressions
See original GitHub issueThe following example has no error:
if (true) {
a = (
1 +
2);
}
I would expect the following errors:
3:0 error Expected indentation of 8 characters indent
4:0 error Expected indentation of 8 characters indent
<bountysource-plugin>
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>
Issue Analytics
- State:
- Created 9 years ago
- Comments:16 (10 by maintainers)
Top Results From Across the Web
Break a statement (expression) into multiple lines: how to indent
Each of these is a valid expression that returns something (function, number, empty list) and then ignores the result and continues.
Read more >Rules - ESLint - Pluggable JavaScript Linter
Rules in ESLint are grouped by type to help you understand their purpose. ... Disallow expressions where the operation doesn't affect the value....
Read more >Rules - JavaScript Standard Style
This is a summary of the standard JavaScript rules. The best way to learn about standard is to just install it and give...
Read more >Rules — yamllint 1.28.0 documentation
When linting a document with yamllint, a series of rules (such as line-length ... defines whether to lint indentation in multi-line strings.
Read more >PEP 8: The Style Guide for Python Code
(See the previous discussion on multiline if-statements for further thoughts on the indentation of such multiline with -statements.) Another such case is with ......
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
I’m working on something to hopefully address part of this issue, specifically enforcing indentation of multi-line chained properties. So the end user will be able to choose this style:
Or this style instead:
And so on…
Any indication as to when we can expect the fix associated with this will be available?