question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

File comment is lost when removing first statement

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:3
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
DrewMLcommented, Jun 21, 2016

@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.

0reactions
danielo515commented, May 29, 2021

What is the rationale to attach comments to other nodes? Why can’t they live as independent nodes?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found