eslint: Indent rule doesn’t validate multiline expressions
The 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>
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 16 (10 by maintainers)
Commits related to this issue
- New: Validate indentation for multi-line chained properties (refs #1801) The end user can choose whether and how much to indent. — committed to Trott/eslint by Trott 8 years ago
- New: Validate indentation for multi-line chained properties (refs #1801) The end user can choose whether and how much to indent. — committed to Trott/eslint by Trott 8 years ago
- Update: Validate indentation for multi-line chained properties (refs #1801) The end user can choose whether and how much to indent. — committed to Trott/eslint by Trott 8 years ago
- Update: Check indentation of multi-line chained properties (refs #1801) The end user can choose whether and how much to indent. — committed to Trott/eslint by Trott 8 years ago
- Update: Check indentation of multi-line chained properties (refs #1801) The end user can choose whether and how much to indent. — committed to Trott/eslint by Trott 8 years ago
- Update: Check indentation of multi-line chained properties (refs #1801) The end user can choose whether and how much to indent. — committed to Trott/eslint by Trott 8 years ago
- Update: Check indentation of multi-line chained properties (refs #1801) The end user can choose whether and how much to indent. — committed to Trott/eslint by Trott 8 years ago
- Update: Check indentation of multi-line chained properties (refs #1801) The end user can choose whether and how much to indent. — committed to Trott/eslint by Trott 8 years ago
- Update: Check indentation of multi-line chained properties (refs #1801) The end user can choose whether and how much to indent. — committed to Trott/eslint by Trott 8 years ago
- Update: Check indentation of multi-line chained properties (refs #1801) The end user can choose whether and how much to indent. — committed to Trott/eslint by Trott 8 years ago
- Update: Check indentation of multi-line chained properties (refs #1801) (#5940) The end user can choose whether and how much to indent. — committed to eslint/eslint by Trott 8 years ago
- Update: rewrite `indent` (fixes #1801, #3845, #6007, #6531, ...9 more) Fixes https://github.com/eslint/eslint/issues/1801, fixes https://github.com/eslint/eslint/issues/3737, fixes https://github.com... — committed to eslint/eslint by not-an-aardvark 8 years ago
- Update: rewrite `indent` (fixes #1801, #3845, #6007, #6531, ...9 more) Fixes https://github.com/eslint/eslint/issues/1801, fixes https://github.com/eslint/eslint/issues/3737, fixes https://github.com... — committed to eslint/eslint by not-an-aardvark 8 years ago
- Update: rewrite `indent` (fixes #1801, #3845, #6007, #6531, ...9 more) Fixes https://github.com/eslint/eslint/issues/1801, fixes https://github.com/eslint/eslint/issues/3737, fixes https://github.com... — committed to eslint/eslint by not-an-aardvark 8 years ago
- Update: rewrite `indent` (fixes #1801, #3845, #6007, #6531, ...9 more) Fixes https://github.com/eslint/eslint/issues/1801, fixes https://github.com/eslint/eslint/issues/3737, fixes https://github.com... — committed to eslint/eslint by not-an-aardvark 8 years ago
- Update: rewrite `indent` (fixes #1801, #3845, #6007, #6531, ...9 more) Fixes https://github.com/eslint/eslint/issues/1801, fixes https://github.com/eslint/eslint/issues/3737, fixes https://github.com... — committed to eslint/eslint by not-an-aardvark 8 years ago
- Update: rewrite `indent` (fixes #1801, #3845, #6007, #6531, ...9 more) Fixes https://github.com/eslint/eslint/issues/1801, fixes https://github.com/eslint/eslint/issues/3737, fixes https://github.com... — committed to eslint/eslint by not-an-aardvark 8 years ago
- Update: rewrite `indent` (fixes #1801, #3845, #6007, #6531, ...9 more) Fixes https://github.com/eslint/eslint/issues/1801, fixes https://github.com/eslint/eslint/issues/3737, fixes https://github.com... — committed to eslint/eslint by not-an-aardvark 8 years ago
- Update: rewrite `indent` (fixes #1801, #3845, #6007, #6531, ...9 more) Fixes https://github.com/eslint/eslint/issues/1801, fixes https://github.com/eslint/eslint/issues/3737, fixes https://github.com... — committed to eslint/eslint by not-an-aardvark 8 years ago
- Update: rewrite `indent` (fixes #1801, #3845, #6007, #6531, ...9 more) Fixes https://github.com/eslint/eslint/issues/1801, fixes https://github.com/eslint/eslint/issues/3737, fixes https://github.com... — committed to eslint/eslint by not-an-aardvark 8 years ago
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?
@5minpause The work I did was merged in 95ea25a45ee4ae327f2e306272d39384e5d4602f. I imagine it will be in the version of ESLint that comes out in a few days.
@kentor
No, but that issue is also known and will hopefully be fixed relatively soon.edit: Actually, I guess it falls under this issue as well, so that case will probably be fixed once this issue is fixed. Also see https://github.com/eslint/eslint/issues/6007 and https://github.com/eslint/eslint/issues/7274.