Registry / testing / eslint-plugin-disable

eslint-plugin-disable

JSON →
library2.0.3jsnpmunverified

ESLint plugin to disable other ESLint plugins for specific files using file path patterns or inline comments. Current stable version is 2.0.3, release cadence low (last release 2020). Key differentiator: selectively disables entire plugins per file, reducing noise in mixed-codebases (e.g., tests vs. source) without disabling rules individually. v2.0.0 broke compatibility with pre-ESLint 6 configs and introduced a required processor declaration. Alternative to manually managing overrides for every rule.

npm install eslint-plugin-disable
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-DISA
E
eslint-plugin-disable
testingjavascriptv2.0.3
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.

disable
import 'eslint-plugin-disable' // or in .eslintrc: plugins: ['disable']
const disable = require('eslint-plugin-disable') // No default export to assign
Plugin is loaded by name in ESLint config; no import or require needed in source code.
processor
processor: 'disable/disable'
processor: 'disable' // Missing /disable sub-path
Mandatory in ESLint config since v2.0.0 for plugin to function.
settings.disable/plugins
settings: { 'disable/plugins': ['react', 'import'] }
settings: { 'eslint-plugin-disable': { plugins: ['react'] } } // Deprecated structure from v1
Setting name changed in v2; array of plugin names to disable.
inline comment
/* eslint-plugin-disable react, jsx-a11y */
/* eslint-disable-plugin react */ // Wrong prefix
Must be a block comment; whitespace after colon is ignored.

Configure .eslintrc to disable 'react' plugin for test files via override and inline comment. Both methods suppress react rules in those files.

// .eslintrc.json { "plugins": ["react", "disable"], "processor": "disable/disable", "rules": { "react/jsx-uses-vars": "error" }, "overrides": [ { "files": ["tests/**/*.test.js"], "settings": { "disable/plugins": ["react"] } } ] } // src/Component.jsx function Component() { return <div>Hello</div>; } // tests/test.js /* eslint-plugin-disable react */ import { render } from '@testing-library/react'; // React plugin errors are suppressed
Debug
Known issues
breakingv2.0.0 requires processor: 'disable/disable' in ESLint config; without it, plugin does nothing.
fix
Add 'processor': 'disable/disable' to your ESLint config (root or overrides).
affects: >=2.0.0
breakingv2.0.0 removed settings.extensions; extensions must be provided via ESLint CLI --ext.
fix
Use ESLint CLI --ext option (e.g., eslint --ext .js,.ts .).
affects: >=2.0.0
breakingv2.0.0 changed settings name from 'eslint-plugin-disable' to 'disable/plugins'.
fix
Update settings in .eslintrc: use 'disable/plugins' array instead of nested object.
affects: >=2.0.0
deprecatedv1.0.0 removed 'extensions' setting; must use ESLint CLI --ext.
fix
Use ESLint CLI --ext to list file extensions for linting.
affects: <2.0.0 >=1.0.0
gotchaInline comment '/* eslint-plugin-disable */' without plugin names disables ALL registered plugins for that file.
fix
Specify plugins to disable, or use 'eslint-plugin-disable-all-except' with explicit list.
affects: >=0.1.0
Errors
Common errors & fixes
ESLint couldn't find the plugin "eslint-plugin-disable". (ESLint configuration error)
Plugin not installed or missing in plugins array in .eslintrc.
fix
Install: npm install eslint-plugin-disable --save-dev. Then add 'disable' to plugins array.
Configuration for rule "react/jsx-uses-vars" is invalid: Value "error" is the wrong type.
React plugin is disabled via inline comment or override, but rules are still configured globally; ignores file.
fix
Ensure disabled plugins' rules are not applied to those files; plugin suppression occurs after rule loading.
Processors is not defined in the configuration for file tests/test.js
Missing processor: 'disable/disable' in the override or root config.
fix
Add 'processor': 'disable/disable' to the relevant override or root config.
Upgrade
Version history
2.0.3latest on npm
Audit
Dependencies
eslintrequiredPeer dependency required for integration; works with ESLint >=0.16.0 but v2+ requires ESLint 6+ overrides feature.
Agent activity
4 hits · last 30 days
node
4
Resources
eslint-plugin-disable — npm install eslint-plugin-disable · libregistry