This rule reports a suppression comment that suppresses no finding, for example
because the code was fixed after the comment was added. The comment would hide a
future finding that nobody has reviewed. The strict preset enables this rule.
Configuration
{
"lint": {
"rules": {
"unknown-utility": "warn",
"unused-lint-suppression": "warn"
}
}
}Reported
// swlint-disable-next-line unknown-utilityunused-lint-suppression: lint suppression for `unknown-utility` suppresses no enabled findings
style("p-4");Fixed
style("p-4");How to fix
Remove the comment, as in the example. If the rule should still report the line, check that the comment is on the right line and names the right rule.
Rule settings
| Preset | Severity |
|---|---|
recommended | off |
strict | deny |
stylistic | off |
Configure lint to change the severity or options.
The CLI and the editor report this rule only when they analyze the whole project.