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 false positive with await and exponentiation operator #12739
Comments
I'm also not sure what the correct behavior is here. It looks like Esprima and Babel's parser also allow for |
Unfortunately, it looks like there wasn't enough interest from the team Thanks for contributing to ESLint and we appreciate your understanding. |
Related discussion: |
It was decided to leave the spec as-is: meaning that |
Tell us about your environment
What parser (default, Babel-ESLint, etc.) are you using?
default
Please show your full configuration:
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.
Online Demo Link
What did you expect to happen?
I believe no error.
By the spec, UnaryExpression can't be the left-hand side of an ExponentiationExpression.
await a ** b
is parsing error forespree
.What actually happened? Please include the actual, raw output from ESLint.
Auto-fixed to:
Message after the fix:
Are you willing to submit a pull request to fix this bug?
Yes.
It would be good to verify is this really a bug in the rule, because
await a ** b
seems to be allowed in Chrome and Firefox. It's interpreted as(await a) ** b
.The text was updated successfully, but these errors were encountered: