Suggestion: Add documentation regarding eslint-ignore comments #16426
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
documentation
Relates to ESLint's documentation
Projects
What problem do you want to solve?
Give a comprehensive explanation of directive comments (e.g.
// eslint-disable-next-line
).I wanted to know how to add a justification to an eslint directive, the only reference to directives (which I didn't know that's what they are called anyway) is for the
--no-ignore-lines
argument (link).To answer my question I ended up going through the eslint source code to find the parsing code of directive statments.
Turns out you need a
(space)--(space)
separator to add a justification to a directive.Silly me had only tried a single
-
, enclosing the comment with"
and similar.What do you think is the correct solution?
Have a page dedicated to ignore comments, the following should be covered:
--no-ignore-lines
argument that can disable them againParticipation
Additional comments
Should there be a rule/setting to require all directives to have justifications then that would be good to mention that as well.
The text was updated successfully, but these errors were encountered: