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

Why transformer add brackets to spread conditions #176

Closed
HichamELBSI opened this issue Dec 23, 2016 · 1 comment
Closed

Why transformer add brackets to spread conditions #176

HichamELBSI opened this issue Dec 23, 2016 · 1 comment
Labels

Comments

@HichamELBSI
Copy link

Hi guys,

All in the title :D see the example below

input :

...
const menu = [
      ...test && test2,
      ...test && test2,
 ];

output :

...
const menu = [
      ...(test && test2),
      ...(test && test2),
 ];
@fkling
Copy link
Contributor

fkling commented Dec 29, 2016

Printing is done by https://github.com/benjamn/recast . I assume it has a generic rule for wrapping certain expression in parenthesis. You can raise an issue, or even better, a pull request, there.

It seems that happens even without any changes to the AST, so that's certainly a concern to raise since untouched lines should not be changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants