Skip to main content

no-restricted-tags

Disallow use of particular tags. It's possible to set exact text match or patterns using a regular expression. See the examples to know how it works.

Configuration​

NameTypeDescription
tagsstring[]Forbid tags by literal match.
patternsRegExp[]Forbid tags by regular expression match.

Examples​

Forbid tags by exact text.​

Forbid the tags @watch, @wip.

{
"no-restricted-tags": [
"error",
{
"tags": [
"@watch",
"@wip"
]
}
]
}

Forbid tags by a pattern (RegEx).​

Forbid tags starting with @todo, using a regular expression.

{
"no-restricted-tags": [
"error",
{
"patterns": [
"^@todo.*"
]
}
]
}

Combine exact text and patterns.​

Forbid the tags @watch, @wip and tags starting with @todo.

{
"no-restricted-tags": [
"error",
{
"tags": [
"@watch",
"@wip"
],
"patterns": [
"^@todo.*"
]
}
]
}