{"id":20589,"library":"suppress-eslint-errors","title":"suppress-eslint-errors","description":"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.","status":"active","version":"3.0.2","language":"javascript","source_language":"en","source_url":"https://github.com/amanda-mitchell/suppress-eslint-errors","tags":["javascript"],"install":[{"cmd":"npm install suppress-eslint-errors","lang":"bash","label":"npm"},{"cmd":"yarn add suppress-eslint-errors","lang":"bash","label":"yarn"},{"cmd":"pnpm add suppress-eslint-errors","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"ESLint must be installed locally to detect violations","package":"eslint","optional":false},{"reason":"Used as the underlying transform mechanism, bundled with the package","package":"jscodeshift","optional":true}],"imports":[{"note":"The package exposes a CLI script called 'suppress-eslint-errors'. Running via npx is the recommended way.","wrong":"npx eslint-suppress-errors","symbol":"suppress-eslint-errors (binary)","correct":"npx suppress-eslint-errors [options] PATH..."},{"note":"The main export is not intended for direct use; the transformer module is located under 'suppress-eslint-errors/transformer'. Use require for CommonJS.","wrong":"const transformer = require('suppress-eslint-errors');","symbol":"transformer (internal)","correct":"const transformer = require('suppress-eslint-errors/transformer');"},{"note":"The CLI entry point is at 'suppress-eslint-errors/cli'. Avoid importing it programmatically unless you know what you're doing.","wrong":"","symbol":"cli (direct)","correct":"require('suppress-eslint-errors/cli')"}],"quickstart":{"code":"npx suppress-eslint-errors ./src --extensions=js,jsx --rules=eqeqeq,@typescript-eslint/no-explicit-any","lang":"javascript","description":"Run the codemod to suppress all violations of eqeqeq and @typescript-eslint/no-explicit-any rules in JS/JSX files under ./src."},"warnings":[{"fix":"Update Node to >= 18 and reinstall suppress-eslint-errors.","message":"v3.0.0 dropped support for Node < 18. Upgrade Node to version 18 or later.","severity":"breaking","affected_versions":"<3.0.0"},{"fix":"When using --message, ensure it does not contain shell metacharacters or use quotes.","message":"v3.0.0 changed the CLI arguments; the --message option now requires a string without special characters. Previously it could be any string.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Remove --ignore-config from your command line.","message":"v2.0.0 deprecated the --ignore-config flag; now .gitignore is automatically detected.","severity":"deprecated","affected_versions":">=2.0.0 <3.0.0"},{"fix":"Either change your ESLint config to treat the rule as an error (e.g., 'warn' -> 'error') or pass the rule IDs via --rules.","message":"The 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.","severity":"gotcha","affected_versions":"*"},{"fix":"Review the output to ensure files are processed; if not, run without .gitignore handling by removing the file temporarily.","message":"JSCodeshift may mishandle .gitignore files with certain patterns, causing all files to be ignored. The tool attempts to detect this but may still skip files.","severity":"gotcha","affected_versions":"*"},{"fix":"Use a legacy ESLint configuration format (e.g., .eslintrc) until flat config support is added.","message":"ESLint flat config is not yet supported. The tool expects a traditional .eslintrc config.","severity":"deprecated","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install --save-dev eslint' or 'yarn add --dev eslint'.","cause":"ESLint is not installed as a project dependency.","error":"Error: Could not find a local ESLint installation. Please install ESLint in your project."},{"fix":"Install jscodeshift as a dependency: 'npm install --save-dev jscodeshift' or run the tool via npx (it bundles jscodeshift internally).","cause":"jscodeshift is not found in PATH when using the wrapper.","error":"Error: jscodeshift is not recognized as an internal or external command"},{"fix":"Run ESLint directly first to identify problematic files, then exclude them or fix the syntax.","cause":"The tool encountered a file that is not parsable by ESLint (e.g., binary, or syntax error).","error":"TypeError: Cannot read properties of undefined (reading 'range')"},{"fix":"Provide one or more file/directory paths as positional arguments: 'npx suppress-eslint-errors ./src'.","cause":"No file path was provided to the CLI command.","error":"Error: Path must be a string. Received undefined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}