Skip to content

@kazupon/prefer-scope-on-tag-comment

Enforce adding a scope to tag comments

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

json
{
  "@kazupon/prefer-scope-on-tag-comment": [
    "error",
    {
      "tags": ["TODO", "FIXME", "HACK", "BUG", "NOTE"]
    }
  ]
}
  • tags (default: ["TODO", "FIXME", "HACK", "BUG", "NOTE"]) - Array of tag keywords to check

🔗 See Also