File comment is lost when removing first statement
See original GitHub issueIf 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.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:3
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Keeping "comments" in Word after deleting associated text
If you delete text that has a comment attached to it, the word is deleted (with a strike-through) but the comments associated.
Read more >Remove first multiline comment from file - Stack Overflow
Is there a way to do this and only remove the multiline comment if it starts at the very first line of the...
Read more >How can I remove all comments from a file?
One way to remove all comments is to use grep with -o option: grep -o '^[^#]*' file. where. -o : prints only matched...
Read more >Keeping comments in Word after deleting associated text
This behaviour is by design. Each comment is considered to be child of a range of text. If you delete the text then...
Read more >How to REMOVE and HIDE comments in Word (w/ Shortcuts)
Learn how to REMOVE and HIDE comments in Word so that you can quickly declutter your workspace and focus on your task at...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@fkling What are your thoughts on adding a
recipes
section to the documentation (similar to this). I’ve found a few examples of use-cases in the past digging through the issues on this repo that would have been great to have documented.I know there are already links to the codemod repos in the bottom of the readme, but specific recipes could be an added bonus.
What is the rationale to attach comments to other nodes? Why can’t they live as independent nodes?