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
New: no-mixed-operators
rule (fixes #6023)
#6241
Conversation
LGTM |
By analyzing the blame information on this pull request, we identified @vitorbal, @platinumazure and @michaelficarra to be potential reviewers |
@@ -0,0 +1,125 @@ | |||
# Disallow mixes of different operators (no-mixed-operators) | |||
|
|||
Enclosing complex expressions by parentheses makes developer's intention clarifying, then the code would get more readability. |
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.
... clarifies the developer's intention, which makes the code more readable.
Thanks for tackling this @mysticatea :) Presets, as discussed in the original issue could eventually be added later (though I don't know when later would be?). Apart from the |
Thank you for many correction! |
d22f6b3
to
5e96c4e
Compare
LGTM |
edit: Or how about |
I will update it after I'm back to my computer. |
5e96c4e
to
89817f4
Compare
LGTM |
I updated this with |
Would this not conflict with |
@ilyavolodin It could. @mysticatea wrote about it in the rule documentation here https://github.com/eslint/eslint/pull/6241/files#diff-9281570e12d9d9c973cc09aa963063ccR17. This conflict was discussed in the original issue too. |
In that case LGTM. |
Woohoo! Thanks a lot folks! Especially @mysticatea :) |
Fixes #6023.
This PR is a reference for discussion.