facebook / facebook/jscodeshift

File comment is lost when removing first statement

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

Description

If you have

```
/**
* @providesModule Foo.react
*/

var React = require('React');
```

and remove the require statement, the docblock is lost. This causes build errors and I had to manually fix up a bunch of files with the last codemod I wrote to restore these.

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.