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.

Breaking: remove attachComment option

See original GitHub issue

TSC Summary: Now that ESLint does not use the attachComment option and given its buggy nature and maintenance cost, I think we should remove the option from Espree.

TSC Question: This is a breaking change, however I suspect that very few other projects are using this option.

I’m more than happy to do the work if this is accepted.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kaicataldocommented, Jan 15, 2019

@benmosher You can still use methods on the SourceCode object returned by context.getSourceCode() to find comments based on their location relative to a given node or token (namely getCommentsBefore(nodeOrToken), getCommentsAfter(nodeOrToken), and getCommentsInside(node)). See the docs here for more details and feel free to stop by the Gitter if something isn’t clear!

1reaction
platinumazurecommented, Jan 12, 2019

@nfroidure espree still parses comments- they’re just stored in a comments array rather than attached directly to nodes. You can iterate through all comments pretty easily. Looking for comments “near nodes” is a bit harder, but still possible: If you are using range info on nodes (and tokens and comments), you could get all comments that start before/after the node you’re looking at and see all comments that might have been attached to the node in the old comment attachment strategy.

You could also look at ESLint’s token store utilities to get an idea of how ESLint manages this information internally.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remove an attachment - Microsoft Support
The option to Remove is on the right-click menu. Note: This method deletes only one attachment at a time. To delete multiple attachments...
Read more >
How to Disable Attachments in SharePoint List?
Choose “Disabled” under Attachments section! That's it! disable attachment in SharePoint List. To make this change programmatically, set ...
Read more >
Disable attachments on a table
Open a record in the table. Right-click the form header and select Configure > Dictionary. Click Advanced view.
Read more >
Delete Attachment - Oracle Help Center
Choose the red X on the Manage Attachment dialog to remove the attachment. Note: Once the Head Contractor changes the status to received,...
Read more >
Removing attachments from your saved messages in Outlook
An alternative is to open the attachment, copy the relevant text and paste it into the body of the message before removing the...
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