eslint-seatbelt is an ESLint plugin that enables gradual tightening of lint rules via a ratcheting mechanism. It stores per-file error counts in a TSV file and automatically updates them on each lint run, preventing new violations while allowing existing ones to be fixed over time. Version 0.1.3 is current, with stable APIs for both ESLint 7 (legacy) and 8+ (flat config). Unlike bulk suppression tools that use JSON/YAML (merge conflicts) or require wrappers, eslint-seatbelt uses the ESLint processor API for seamless editor/CI integration. Reimplements an internal Notion tool used for large-scale rule migrations. Ships TypeScript types.
npm install eslint-seatbeltVerified import paths — ran on the pinned version, not inferred.
Sets up eslint-seatbelt with flat config, then runs SEATBELT_INCREASE to ratchet a new rule.
Use npm add eslint-plugin-eslint-seatbelt@npm:eslint-seatbelt --save-dev when using ESLint <=7. This aliases package to satisfy plugin naming convention.
Set all rules you want to enforce via seatbelt to 'error' severity. Warnings are not tracked and will not prevent regressions.
Always commit eslint.seatbelt.tsv. In CI, run with SEATBELT_FROZEN=1 or CI=1 to verify file is up-to-date.
Avoid parallel linting across files; run a single ESLint pass to ensure atomic updates to the TSV file.
Use seatbelt.configs.enable which sets processor correctly, or manually: processor: seatbelt.processors.seatbelt
Run: npm add eslint-plugin-eslint-seatbelt@npm:eslint-seatbelt --save-dev
Use [ seatbelt.configs.enable ] or spread: ...seatbelt.configs.enable is incorrect; just object reference.