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 have false positive about for-of statement #9755

Closed
mysticatea opened this issue Dec 22, 2017 · 2 comments · Fixed by #9795, mono-js/mono-notifications#5, mono-js/mono-push#5 or terrajs/lib-starter#5 · May be fixed by ali8889/emerald-wallet#4
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

@mysticatea
Copy link
Member

Tell us about your environment

  • ESLint Version: v4.13.1
  • Node Version: -
  • npm Version: -

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

  • default

Please show your full configuration:
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

/*eslint no-extra-parens: [error, all] */

for (a in (b, c));
for (a of (b, c));

Online demo

What did you expect to happen?

ESLint reports an error:

  • 3:11 - Gratuitous parentheses around expression. (no-extra-parens)

Because for (a of b, c); is syntax error. (related to acornjs/acorn#642)

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

ESLint reports 2 errors:

  • 3:11 - Gratuitous parentheses around expression. (no-extra-parens)
  • 4:11 - Gratuitous parentheses around expression. (no-extra-parens)
@mysticatea mysticatea added accepted There is consensus among the team that this change meets the criteria for inclusion bug ESLint is working incorrectly rule Relates to ESLint's core rules labels Dec 22, 2017
@erindepew
Copy link
Contributor

@mysticatea if this issue hasn't already been claimed I'd be interested in fixing this!

@mysticatea
Copy link
Member Author

@erindepew Please! I have not started yet.

erindepew pushed a commit to erindepew/eslint that referenced this issue Jan 1, 2018
erindepew pushed a commit to erindepew/eslint that referenced this issue Jan 1, 2018
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Jul 4, 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 Jul 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.