no-mixed-operators: don't require parentheses around a single ternary operator argument #14223
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
bug
ESLint is working incorrectly
repro:yes
rule
Relates to ESLint's core rules
Projects
The only way to write the
a ? b && c : d
expression in compliance withno-mixed-operators
rule (when ternary operator is added to logical operators group) is to use the parentheses twice:In my opinion, parentheses around
a
shouldn't be required.What rule do you want to change?
no-mixed-operators
Does this change cause the rule to produce more or fewer warnings?
Fewer warnings
How will the change be implemented? (New option, new default behaviour, etc.)?
New default behaviour, I guess
Please provide some example code that this change will affect:
Group:
["&&", "||", "?:"]
What does the rule currently do for this code?
Reports an error
What will the rule do after it's changed?
It will not report an error
Are you willing to submit a pull request to implement this change?
No
The text was updated successfully, but these errors were encountered: