Breaking: remove attachComment option
See original GitHub issueTSC 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:
- Created 5 years ago
- Reactions:5
- Comments:6 (3 by maintainers)
Top 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 >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
@benmosher You can still use methods on the
SourceCode
object returned bycontext.getSourceCode()
to find comments based on their location relative to a given node or token (namelygetCommentsBefore(nodeOrToken)
,getCommentsAfter(nodeOrToken)
, andgetCommentsInside(node)
). See the docs here for more details and feel free to stop by the Gitter if something isn’t clear!@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.