Skip to content
← All rules
CommentsTooling directives

comments/require-justified-suppressions

Explicit lint, type-check, coverage, formatter, Semgrep, and Scruple suppressions should state why bypassing the tool is justified.

suppressionlintjustification
TypeScript
// eslint-disable-next-line no-console
console.log(value);
Finding

Require explanations for tool suppressions.

Setup

Install the package, register its plugin factory, then enable the rule.

Install the package

pnpm add -D @scruple/comments

Register the plugin

In scruple.config.ts, register the factory under the comments namespace used by the rule ID.

import { comments } from "@scruple/comments";

plugins: {
  "comments": comments(),
},

Enable the rule

"comments/require-justified-suppressions": "warn"
Package
@scruple/comments
Default threshold
0.85
Minimum confidence
0.7

Released under the MIT License.