New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 3.9.0 broke multiline array indentation #7473
Comments
Thanks for the suggestion. I agree that this would be a useful option. Previously, the indentation of array elements was not checked at all in these cases, so the change in v3.9.0 was a bugfix for that case. But it seems reasonable to have an option to customize this. |
@ilyavolodin: I saw that you added the "regression"/"patch candidate" labels. However, I disagree that this is a regression; the bugfix is working as intended, which in this case means that more errors are reported. If we added an additional option, it would be semver-minor, not semver-patch. |
I'm experiencing something similar, and it seems that this is, indeed, a regression. I would expect the following to be valid: Actual code causing the error:
Actual error:
The key here, interestingly, is the |
@ianlyons Hmm, that part does seem like unintended behavior. Would you mind creating a new issue for it so that we can track it separately? |
@not-an-aardvark will do. Edit: done - #7484. |
@not-an-aardvark Fair enough. |
Note: version 3.9.0 also broke multi-line object indentation. My two cents on this issue:Indentation checking is disabled by default on function parameters and call expression arguments. Why must it be enabled by default on arrays/objects? The change broke a lot of my code (where broke reads as: ESLint now complains about it). I agree that the option to indent array elements and object properties should be added, possibly with a |
Downgrade eslint to 3.8 to avoid eslint/eslint#7473
I'll champion this proposal. |
@eslint/eslint-team We need one more +1 to accept this issue; any takers? @nunocastromartins Ideally, I think nothing would be disabled by default. The user shouldn't have to specify ten different config options just to check indentation. |
@not-an-aardvark We have 3 + champion (me, @platinumazure and @mysticatea). So marking as accepted. |
I know I'm late to the game on this, but having just noticed this, I agree with @nunocastromartins. This was effectively a breaking change and should have been denoted as such with semver. |
Tell us about your environment
What parser (default, Babel-ESLint, etc.) are you using? default
Please show your full configuration:
What did you do? Please include the actual source code causing the issue.
What did you expect to happen?
This was considered valid before this release. It would be great to have the
first
option for arrays too.What actually happened? Please include the actual, raw output from ESLint.
The text was updated successfully, but these errors were encountered: