Appearance
Enforce adding a scope to tag comments
This rule enforces that tag comments (like TODO, FIXME, etc.) include a scope identifier in parentheses. The scope can be an author name, team name, ticket number, module name, or any other identifier that provides context about the comment.
TODO
FIXME
Some examples of incorrect code for this rule:
Some examples of correct code for this rule:
{ "@kazupon/prefer-scope-on-tag-comment": [ "error", { "tags": ["TODO", "FIXME", "HACK", "BUG", "NOTE"], "directives": [ "eslint-disable", "eslint-disable-next-line", "eslint-disable-line", "@ts-expect-error", "@ts-ignore", "@ts-nocheck" ] } ] }
tags
["TODO", "FIXME", "HACK", "BUG", "NOTE"]
directive
["eslint-disable", "eslint-disable-next-line", "eslint-disable-line", "@ts-expect-error", "@ts-ignore", "@ts-nocheck"]
This rule was introduced in @kazupon/eslint-plugin v0.4.0
@kazupon/eslint-plugin
@kazupon/prefer-scope-on-tag-comment
Rule Details
This rule enforces that tag comments (like
TODO
,FIXME
, etc.) include a scope identifier in parentheses. The scope can be an author name, team name, ticket number, module name, or any other identifier that provides context about the comment.Fail
Some examples of incorrect code for this rule:
Pass
Some examples of correct code for this rule:
🔧 Options
tags
(default:["TODO", "FIXME", "HACK", "BUG", "NOTE"]
)directive
(default:["eslint-disable", "eslint-disable-next-line", "eslint-disable-line", "@ts-expect-error", "@ts-ignore", "@ts-nocheck"]
)Version
This rule was introduced in
@kazupon/eslint-plugin
v0.4.0Implementation
🔗 See Also