Registry / devops / suppress-eslint-errors

suppress-eslint-errors

JSON →
library3.0.2jsnpmunverified

A jscodeshift-based codemod that runs ESLint against your codebase and adds eslint-disable-next-line comments for all existing violations, allowing gradual adoption of new rules. Current stable version is 3.0.2 (released under a new maintainer). Release cadence is sporadic, with major version bumps for breaking changes. Key differentiator: unlike manual rule disabling or lint suppressions, this automates the tedious process of adding suppression comments for legacy code, enabling teams to enable strict rules without immediate rewrites. Requires ESLint locally installed and Node >= 18.

npm install suppress-eslint-errors
INSTALL
IMPORT
SIG · SUPPRESS-ESLINT-ER
S
suppress-eslint-errors
devopsjavascriptv3.0.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

suppress-eslint-errors (binary)
npx suppress-eslint-errors [options] PATH...
npx eslint-suppress-errors
The package exposes a CLI script called 'suppress-eslint-errors'. Running via npx is the recommended way.
transformer (internal)
const transformer = require('suppress-eslint-errors/transformer');
const transformer = require('suppress-eslint-errors');
The main export is not intended for direct use; the transformer module is located under 'suppress-eslint-errors/transformer'. Use require for CommonJS.
cli (direct)
require('suppress-eslint-errors/cli')
The CLI entry point is at 'suppress-eslint-errors/cli'. Avoid importing it programmatically unless you know what you're doing.

Run the codemod to suppress all violations of eqeqeq and @typescript-eslint/no-explicit-any rules in JS/JSX files under ./src.

npx suppress-eslint-errors ./src --extensions=js,jsx --rules=eqeqeq,@typescript-eslint/no-explicit-any
suppress-eslint-errors --version
Debug
Known issues
breakingv3.0.0 dropped support for Node < 18. Upgrade Node to version 18 or later.
fix
Update Node to >= 18 and reinstall suppress-eslint-errors.
affects: <3.0.0
breakingv3.0.0 changed the CLI arguments; the --message option now requires a string without special characters. Previously it could be any string.
fix
When using --message, ensure it does not contain shell metacharacters or use quotes.
affects: >=3.0.0
deprecatedv2.0.0 deprecated the --ignore-config flag; now .gitignore is automatically detected.
fix
Remove --ignore-config from your command line.
affects: >=2.0.0 <3.0.0
gotchaThe tool only suppresses errors, not warnings. If you have warnings you want to suppress, upgrade them to errors in your ESLint config or use --rules to specify them.
fix
Either change your ESLint config to treat the rule as an error (e.g., 'warn' -> 'error') or pass the rule IDs via --rules.
affects: *
gotchaJSCodeshift may mishandle .gitignore files with certain patterns, causing all files to be ignored. The tool attempts to detect this but may still skip files.
fix
Review the output to ensure files are processed; if not, run without .gitignore handling by removing the file temporarily.
affects: *
deprecatedESLint flat config is not yet supported. The tool expects a traditional .eslintrc config.
fix
Use a legacy ESLint configuration format (e.g., .eslintrc) until flat config support is added.
affects: *
Errors
Common errors & fixes
Error: Could not find a local ESLint installation. Please install ESLint in your project.
ESLint is not installed as a project dependency.
fix
Run 'npm install --save-dev eslint' or 'yarn add --dev eslint'.
Error: jscodeshift is not recognized as an internal or external command
jscodeshift is not found in PATH when using the wrapper.
fix
Install jscodeshift as a dependency: 'npm install --save-dev jscodeshift' or run the tool via npx (it bundles jscodeshift internally).
TypeError: Cannot read properties of undefined (reading 'range')
The tool encountered a file that is not parsable by ESLint (e.g., binary, or syntax error).
fix
Run ESLint directly first to identify problematic files, then exclude them or fix the syntax.
Error: Path must be a string. Received undefined
No file path was provided to the CLI command.
fix
Provide one or more file/directory paths as positional arguments: 'npx suppress-eslint-errors ./src'.
Upgrade
Version history
3.0.2latest on npm
Audit
Dependencies
eslintrequiredESLint must be installed locally to detect violations
jscodeshiftoptionalUsed as the underlying transform mechanism, bundled with the package
Agent activity
8 hits · last 30 days
node
8
Resources
suppress-eslint-errors — npm install suppress-eslint-errors · libregistry