Skip to content
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

no-extra-parens new option to avoid conflicts with no-sequences #11916


Copy link

@mdjermanovic mdjermanovic commented Jun 28, 2019

What rule do you want to change?


Does this change cause the rule to produce more or fewer warnings?


How will the change be implemented? (New option, new default behavior, etc.)?

new option

Please provide some example code that this change will affect:

/* eslint  no-extra-parens: "error" */
/* eslint  no-sequences: "error" */

(a, b); // 'no-extra-parens' warning

if ((a, b)); // 'no-extra-parens' warning

while((a, b)); // 'no-extra-parens' warning

What does the rule currently do for this code?

Fixes it to:

/* eslint  no-extra-parens: "error" */
/* eslint  no-sequences: "error" */

a, b; // 'no-sequences' warning

if (a, b); // 'no-sequences' warning

while(a, b); // 'no-sequences' warning

What will the rule do after it's changed?

/* eslint  no-extra-parens: ["error", "all", { "sequenceExpressions": false }] */
/* eslint  no-sequences: "error" */

(a, b); // no warnings

if ((a, b)); // no warnings

while((a, b)); // no warnings

Are you willing to submit a pull request to implement this change?


@mysticatea mysticatea added evaluating and removed triage labels Jun 28, 2019
@eslint eslint bot closed this Jul 29, 2019
@eslint eslint bot added the auto closed label Jul 29, 2019

This comment has been minimized.

Copy link

@eslint eslint bot commented Jul 29, 2019

Unfortunately, it looks like there wasn't enough interest from the team
or community to implement this change. While we wish we'd be able to
accommodate everyone's requests, we do need to prioritize. We've found
that issues failing to reach accepted status after 21 days tend to
never be accepted, and as such, we close those issues.
This doesn't mean the idea isn't interesting or useful, just that it's
not something the team can commit to.

Thanks for contributing to ESLint and we appreciate your understanding.


This comment has been minimized.

Copy link

@platinumazure platinumazure commented Aug 18, 2019

@eslint/eslint-team This just needs a champion and we could accept this!


This comment has been minimized.

Copy link

@kaicataldo kaicataldo commented Aug 18, 2019

I'll champion this.

@kaicataldo kaicataldo self-assigned this Aug 18, 2019
@kaicataldo kaicataldo reopened this Aug 18, 2019

This comment has been minimized.

Copy link
Member Author

@mdjermanovic mdjermanovic commented Aug 18, 2019

I'm working on this :)

What should be the name of the new option? The last was enforceForArrowConditionals

Maybe enforceForSequenceExpressions instead of just sequenceExpressions?


This comment has been minimized.

Copy link

@platinumazure platinumazure commented Aug 19, 2019

I like enforceForSequenceExpressions personally. I generally don't like option names without a verb indicating what will happen if you turn it on. (Just my two cents; other team members may have their own opinion.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.