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
Proposal: Add "consistent" option to array-element-newline #9457
Comments
I'll support this. Thanks for the suggestion! |
Thanks @platinumazure! I wonder if I can start working on a PR or we need more votes here to accept this...? Is there anything I can do to further this? |
@robertrossmann Every proposal requires 3 members of the team to support it, and one more member to champion it. I'll support this proposal. @eslint/eslint-team anyone else wants to support this? |
I like this option! 👍 |
I'll champion. Just needs one more 👍 from the @eslint/eslint-team! |
@eslint/eslint-team Can we get one more 👍 for this proposal? If not, I'll have to close. Thanks! |
Apologies for the delay. This is now accepted. |
Tell us about your environment
I would like to propose to add a third, new option,
consistent
, to the rule array-element-newline.Expected behaviour
Given
'array-element-newline': ['warn', 'consistent']
, a newline would be required between all array elements if any of the elements are placed on a separate line.Good
Bad
Autofix
If implemented, the autofix would separate all elements onto a separate line if any of the elements are on a separate line. The autofix would never put all elements into a single line.
Current behaviour
The rule currently only supports only:
num
elements-based decision about elements placementThis follows the idea recently implemented in #9206 for
array-bracket-newline
and is tangentially related to #9054.The text was updated successfully, but these errors were encountered: