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
| Name | Type | Description |
|---|---|---|
tags | string[] | Forbid tags by literal match. |
patterns | RegExp[] | 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,@wipand tags starting with@todo.
{
"no-restricted-tags": [
"error",
{
"tags": [
"@watch",
"@wip"
],
"patterns": [
"^@todo.*"
]
}
]
}