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
Update: Rename and deprecate misnamed option #9570
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I think it should be Update
, instead of Chore
. 😄
Thanks, @aladdin-add. The Developer Guide says the |
@jrpool |
@jrpool That description is grammatically ambiguous but I think it's supposed to read like this: "a backwards-compatible enhancement, or a change to a rule that increases the number of reported problems". This change is the first... Make sense? |
Object option allowMultiplePropertiesPerLine is stricter than the name implies. It creates an exception to object-property-newline only if ALL properties are on a SINGLE line. Renamed accordingly. Old name left deprecated, and 2 tests with deprecated name (1 valid and 1 invalid) left in force.
Thank you, @ilyavolodin and @platinumazure. I suspected that ambiguity but thought the most natural interpretation was with the qualifier modifying both alternatives. I have amended the description of this PR and the heading of the commit. I can submit another PR disambiguating the tag definition in the developer doc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! We just need to evaluate the overall proposal, hopefully we can get that done soon.
I'll champion this. @eslint/eslint-team Can we please evaluate this proposal? The object option is currently misnamed and it would be good to address this (in a backwards compatible manner, of course). @ilyavolodin @aladdin-add Since you approved the PR, are you willing to 👍 the proposal? |
@eslint/eslint-team We just need one more 👍 |
Marking as accepted (champion: me, 👍s: ilyavolodin, kaicataldo, mysticatea). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for contributing to ESLint!
Object option
allowMultiplePropertiesPerLine
is stricter than the name implies.It creates an exception to
object-property-newline
only if ALL properties areon a SINGLE line. Renamed accordingly. Old name left deprecated, and 2 tests with
deprecated name (1 valid and 1 invalid) left in force.
What is the purpose of this pull request? (put an "X" next to item)
[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[X] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
What rule do you want to change?
object-property-newline
Does this change cause the rule to produce more or fewer warnings?
No.
How will the change be implemented? (New option, new default behavior, etc.)?
Replacement of old property name with new one, except that old name remains as deprecated and is still (rudimentarily) tested for.
Please provide some example code that this change will affect:
What does the rule currently do for this code?
Permits it if
object-property-newline
is enabled, but only if itsallowMultiplePropertiesPerLine
option is set to true.What will the rule do after it's changed?
Permit it if
object-property-newline
is enabled, but only if either itsallowMultiplePropertiesPerLine
option or itsallowAllPropertiesOnSameLine
option is set to true.What changes did you make? (Give an overview)
Documented the
allowMultiplePropertiesPerLine
option as deprecated and added 2 tests for that option. Otherwise, changed that option throughout toallowAllPropertiesOnSameLine
.Is there anything you'd like reviewers to focus on?