Justify-disable
Justify-disable is a CLI and JavaScript API that fails the build when an eslint-disable or stylelint-disable directive has no written @todo <reason> comment directly above it. A reason can carry a condition that expires it on a date, a version or a dependency change. It reads files with git, so it runs without ESLint or Stylelint installed.
Content is verified against
@ladamczyk/justify-disablev1.0.1. SeeCHANGELOG.mdto verify accuracy.
Why
Suppressions without a stated reason rot: nobody remembers why a rule was switched off, so nobody dares to switch it back on. AI coding agents make this worse, because adding a disable comment is the quickest way to make a lint error go away. It turns every suppression into a decision someone wrote down, and lets that decision expire.
// @todo [2030-01-01] Legacy SDK returns any; type it after the v3 upgrade.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const response: any = await legacyCall();
It is heavily inspired by unicorn's expiring-todo-comments. See The rule for what counts as a reason and Todo conditions for expiry.
Install
npm install --save-dev @ladamczyk/justify-disable
npx justify-disable
or run it without installing:
npx @ladamczyk/justify-disable
It needs Node ^22.22.2, ^24.15.0 or >=26, npm 10 or later, and a git repository (or a custom provider).
Compared with ESLint rules
| What you get | justify-disable | eslint-comments/require-description | unicorn/expiring-todo-comments |
|---|---|---|---|
| Requires a reason for lint disables | yes, a @todo comment on the line above | yes, after -- in the same comment | no, it checks TODO comments |
| Stylelint directives | yes | no | no |
| Reason expires | date, own version, engine, dependency added, removed or ranged | no | yes, for TODO comments |
Custom directives (@ts-ignore, …) | yes, through tools config | yes, through additionalDirectives | no |
| Needs ESLint | no | yes | yes |
The ESLint rules are good choices when ESLint already runs everywhere, and Stylelint's own reportDescriptionlessDisables option requires a -- reason on Stylelint disables. Reach for this one when you want a single check across ESLint and Stylelint directives, outside the linters, with reasons that expire. Alternatives compares every option, built-ins included, and says when you don't need this tool.
Use it as a gate
- Command line: exit
1on any error-severity violation,--jsonfor machines. - AI agents and CI: the JSON shape, exit codes and an
AGENTS.mdsnippet. - qoq integration: turn it on in
qoq --check. - JavaScript API:
lint()andformat()from Node.
Changelog
Release history lives in the repo — CHANGELOG.md.