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 has a false negative with binary expressions that are only one level deep #7229

Closed
not-an-aardvark opened this issue Sep 24, 2016 · 3 comments
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 rule Relates to ESLint's core rules

Comments

@not-an-aardvark
Copy link
Member

Tell us about your environment

  • ESLint Version: 3.6.0
  • Node Version: 6.6.0
  • npm Version: 3.10.3

What parser (default, Babel-ESLint, etc.) are you using? default

Please show your full configuration:

(none)

What did you do? Please include the actual source code causing the issue.

echo '((((foo)))) instanceof bar' | eslint --stdin --no-eslintrc --rule 'no-extra-parens: [2, "all", {"nestedBinaryExpressions": false}]'

What did you expect to happen?

I expected ESLint to report an error, because the parentheses around foo are unnecessary.

What actually happened? Please include the actual, raw output from ESLint.

No error.

@eslintbot eslintbot added the triage An ESLint team member will look at this issue soon label Sep 24, 2016
@not-an-aardvark
Copy link
Member Author

Working on a fix.

@not-an-aardvark not-an-aardvark changed the title no-extra-parens has a false negative with in and instanceof expressions no-extra-parens has a false negative with some binary expressions Sep 24, 2016
@platinumazure platinumazure added bug ESLint is working incorrectly rule Relates to ESLint's core rules accepted There is consensus among the team that this change meets the criteria for inclusion and removed triage An ESLint team member will look at this issue soon labels Sep 24, 2016
not-an-aardvark added a commit to not-an-aardvark/eslint that referenced this issue Sep 24, 2016
@platinumazure
Copy link
Member

Confirmed the original example in online demo.

@not-an-aardvark Could you be more specific about what "some binary expressions" means here? Thanks!

@not-an-aardvark not-an-aardvark changed the title no-extra-parens has a false negative with some binary expressions no-extra-parens has a false negative with binary expressions that are only one level deep Sep 24, 2016
@not-an-aardvark
Copy link
Member Author

Updated the title to be more descriptive. (Additional explanation can also be found in #7231.)

not-an-aardvark added a commit to not-an-aardvark/eslint that referenced this issue Sep 24, 2016
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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 rule Relates to ESLint's core rules
Projects
None yet
Development

No branches or pull requests

3 participants