-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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: add option "allowInParentheses" to no-sequences (fixes #14197) #14199
Conversation
What about a second option "allowForLoopAfterthoughts" (name taken from no-plusplus)? Can/should be Would make the last sentence in the documentation obsolete ("Another case is where you might want to report all usages of the comma operator, even in a for loop. You can achieve this using rule |
👍 to "allowForLoopAfterthoughts". can you file a new issue please? |
|
BTW I signed the CLA yesterday. |
@aladdin-add how do I find a champion (sorry, this is my first PR in eslint)... |
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.
I marked this as accepted now that the issue is accepted. Nice work @danielrentz! I had one idea for the docs, but LGTM either way.
The CLA check is still pending. It looks like you used a different email address for commits, so maybe this could help: |
Oh right, I committed with my company address. I have added this address to my github account right now, is there any information what to do to make the CLA step pass? |
I think the bot will re-check all commits after the next one. |
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.
Looks great, thanks for contributing!
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an 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?
no-sequences
Does this change cause the rule to produce more or fewer warnings?
more
How will the change be implemented? (New option, new default behavior, etc.)?
new option "allowInParentheses".
Please provide some example code that this change will affect:
What does the rule currently do for this code?
What will the rule do after it's changed?
fixes #14197
What changes did you make? (Give an overview)
Add new option "allowInParentheses" to rule "no-sequences" to opt-in for allowing parenthesized sequence expressions.
Is there anything you'd like reviewers to focus on?
This is the first commit which adds the option and adapts the unit tests.
To be done:
allowInParentheses
. By default the rule is strict, and users can opt-in for more "sloppiness".false
making this a breaking change. Maybe set default value totrue
? Is this acceptable? Personally, I dislike boolean options defaulting totrue
.Missing documentation. Do you have a pointer where to add this?