-
Notifications
You must be signed in to change notification settings - Fork 350
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
Brocken parenthesizes around arrow function body when return an object #743
Comments
coderaiser
added a commit
to coderaiser/putout
that referenced
this issue
Aug 30, 2020
coderaiser
added a commit
to coderaiser/putout
that referenced
this issue
Aug 30, 2020
This was referenced Apr 30, 2021
Verified this no longer reproduces. Thanks for the nudge, @gnprice. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
recast
produces invalid code whenbabel
used as a parser for such code, that returns an object:before:
after:
Which is invalid because has different meaning without parenthesizes, as a labeled series expressions without an end.
Can be reproduced using
v0.20.2
with:Output:
Can be related to #705
This can be fixed setting createParenthesizedExpressions:
But would be amazing if this option can be avoided, because it makes harder to traverse and compare
AST
nodes, becauseParenthesizedExpressions
adds an extra noise.The text was updated successfully, but these errors were encountered: