ignore-lint-errors

raw JSON →
0.10.0 verified Fri May 01 auth: no javascript

A codemod that automatically adds per-line lint suppression comments (e.g., eslint-disable-next-line, @glint-expect-error) for every lint error in your codebase. The current stable version is 0.10.0, with releases occurring weekly or as needed. It supports ESLint v9, Glint v2, Stylelint v17, and TypeScript v5, and is Node.js v22+. Unlike other tools that use global file-level ignores, this codemod adds a local comment per error, providing a more accurate count of issues and preserving linting for clean code. It requires pnpx to run and a separate formatting step after execution.

error Error: Cannot find module 'ignore-lint-errors'
cause The package is not installed or is installed globally but being imported as a module.
fix
Install locally: pnpm add -D ignore-lint-errors
error Error: The engine "node" is incompatible with this module. Expected version "22.* || >= 24". Got "20.x.x"
cause Node.js version is too old.
fix
Upgrade Node.js to v22 or later.
error SyntaxError: Unexpected token 'export'
cause Using require() on an ESM-only package.
fix
Use import syntax: import { ignoreLintErrors } from 'ignore-lint-errors'
breaking Package requires Node.js v22 or above. Older Node.js versions will fail to run.
fix Upgrade Node.js to v22 or later.
deprecated The argument `--linter` must be specified; omitting it will cause an error.
fix Always pass `--linter eslint`, `--linter stylelint`, or `--linter typescript`.
gotcha After running the codemod, you must run Prettier (or another formatter) separately; the codemod does not format code.
fix Run `pnpm prettier . --write` or equivalent after the codemod.
gotcha The codemod is not designed to cover one-off edge cases; it may miss some lint errors or produce incorrect comments in unusual file configurations.
fix Clone the repo and run the codemod locally after customizing the source code.
npm install ignore-lint-errors
yarn add ignore-lint-errors
pnpm add ignore-lint-errors

Run the codemod to add eslint-disable-next-line comments for all ESLint errors in the app directory, then fix formatting with Prettier.

cd /path/to/your/project
pnpx ignore-lint-errors --linter eslint --src app
pnpm prettier . --write