no-extra-parens new option to avoid conflicts with no-sequences
See original GitHub issueWhat rule do you want to change?
no-extra-parens
Does this change cause the rule to produce more or fewer warnings?
fewer
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?
Yes
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Positive consequences of conflict on decision making - PubMed
Much research has shown that conflict is aversive and leads to increased choice deferral. In contrast, we have proposed that conflict can be...
Read more >10.3 Causes and Outcomes of Conflict - Publishing Services
However, conflict can have both positive and negative outcomes. On the positive side, conflict can result in greater creativity or better decisions. For ......
Read more >Fitness consequences of outgroup conflict - eLife
A detailed discussion of the broad range of immediate, delayed, cumulative, and third-party fitness consequences arising from outgroup ...
Read more >When the consequences of conflicts last generations
The immediate effects of conflict are starkly clear. They include deaths and injuries, population displacement, the destruction of assets, ...
Read more >Why you need a conflict of interest policy - PowerDMS
This issue impacts organizations across the board – non-profits, ... The best approach to avoiding conflict of interest lies in the prevention stage....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.)I’m working on this 😃
What should be the name of the new option? The last was
enforceForArrowConditionals
Maybe
enforceForSequenceExpressions
instead of justsequenceExpressions
?