facebook / facebook/jscodeshift

Reprinting file without changes line break changes

Open
#52 2 comments 0 reactions 0 assignees View on GitHub
bug upstream
Dominant language
JavaScript
Stars
10k
Forks
498
PR merge metrics
No merged PRs in 30d

Description

Parsing and reprinting

``` js
// I have a parent
newNode.parent
&& (
(// Or I did but its different than the one I have now.
!originalNode.parent ||
newNode.parent.key !== originalNode.parent.key
)
)
```

outputs

``` js
// I have a parent
newNode.parent
&& (
(// Or I did but its different than the one I have now.
(!originalNode.parent || newNode.parent.key !== originalNode.parent.key)
)
)
```

which is inconvenient for codemods. Live test: http://felix-kling.de/esprima_ast_explorer/#/NvtYJQH95L.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.