question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

What 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:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
platinumazurecommented, 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.)

0reactions
mdjermanoviccommented, 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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found