Registry / devops / ignore-lint-errors

ignore-lint-errors

JSON →
library0.10.0jsnpmunverified

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.

npm install ignore-lint-errors
INSTALL
IMPORT
SIG · IGNORE-LINT-ERRORS
I
ignore-lint-errors
devopsjavascriptv0.10.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ignoreLintErrors
import { ignoreLintErrors } from 'ignore-lint-errors'
const ignoreLintErrors = require('ignore-lint-errors')
Package is ESM-only; require() will fail.
run
import { run } from 'ignore-lint-errors'
The `run` function is the main programmatic entry point. It accepts options like `linter`, `root`, and `src`.
default
import ignoreLintErrors from 'ignore-lint-errors'
A default export is also available, which is the same as the named `ignoreLintErrors` export.

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
lint-errors --version
Debug
Known issues
breakingPackage requires Node.js v22 or above. Older Node.js versions will fail to run.
fix
Upgrade Node.js to v22 or later.
affects: <22
deprecatedThe argument `--linter` must be specified; omitting it will cause an error.
fix
Always pass `--linter eslint`, `--linter stylelint`, or `--linter typescript`.
affects: >=0.1.0
gotchaAfter 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.
affects: >=0.1.0
gotchaThe 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.
affects: >=0.1.0
Errors
Common errors & fixes
Error: Cannot find module 'ignore-lint-errors'
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: The engine "node" is incompatible with this module. Expected version "22.* || >= 24". Got "20.x.x"
Node.js version is too old.
fix
Upgrade Node.js to v22 or later.
SyntaxError: Unexpected token 'export'
Using require() on an ESM-only package.
fix
Use import syntax: `import { ignoreLintErrors } from 'ignore-lint-errors'`
Upgrade
Version history
0.10.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
ignore-lint-errors — npm install ignore-lint-errors · libregistry