{"id":19728,"library":"eslint-plugin-disable","title":"eslint-plugin-disable","description":"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.","status":"maintenance","version":"2.0.3","language":"javascript","source_language":"en","source_url":"https://github.com/mradionov/eslint-plugin-disable","tags":["javascript","eslint","eslintplugin","disable","plugin"],"install":[{"cmd":"npm install eslint-plugin-disable","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-disable","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-disable","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency required for integration; works with ESLint >=0.16.0 but v2+ requires ESLint 6+ overrides feature.","package":"eslint","optional":false}],"imports":[{"note":"Plugin is loaded by name in ESLint config; no import or require needed in source code.","wrong":"const disable = require('eslint-plugin-disable') // No default export to assign","symbol":"disable","correct":"import 'eslint-plugin-disable' // or in .eslintrc: plugins: ['disable']"},{"note":"Mandatory in ESLint config since v2.0.0 for plugin to function.","wrong":"processor: 'disable' // Missing /disable sub-path","symbol":"processor","correct":"processor: 'disable/disable'"},{"note":"Setting name changed in v2; array of plugin names to disable.","wrong":"settings: { 'eslint-plugin-disable': { plugins: ['react'] } } // Deprecated structure from v1","symbol":"settings.disable/plugins","correct":"settings: { 'disable/plugins': ['react', 'import'] }"},{"note":"Must be a block comment; whitespace after colon is ignored.","wrong":"/* eslint-disable-plugin react */ // Wrong prefix","symbol":"inline comment","correct":"/* eslint-plugin-disable react, jsx-a11y */"}],"quickstart":{"code":"// .eslintrc.json\n{\n  \"plugins\": [\"react\", \"disable\"],\n  \"processor\": \"disable/disable\",\n  \"rules\": {\n    \"react/jsx-uses-vars\": \"error\"\n  },\n  \"overrides\": [\n    {\n      \"files\": [\"tests/**/*.test.js\"],\n      \"settings\": {\n        \"disable/plugins\": [\"react\"]\n      }\n    }\n  ]\n}\n\n// src/Component.jsx\nfunction Component() {\n  return <div>Hello</div>;\n}\n\n// tests/test.js\n/* eslint-plugin-disable react */\nimport { render } from '@testing-library/react';\n// React plugin errors are suppressed\n","lang":"javascript","description":"Configure .eslintrc to disable 'react' plugin for test files via override and inline comment. Both methods suppress react rules in those files."},"warnings":[{"fix":"Add 'processor': 'disable/disable' to your ESLint config (root or overrides).","message":"v2.0.0 requires processor: 'disable/disable' in ESLint config; without it, plugin does nothing.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use ESLint CLI --ext option (e.g., eslint --ext .js,.ts .).","message":"v2.0.0 removed settings.extensions; extensions must be provided via ESLint CLI --ext.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Update settings in .eslintrc: use 'disable/plugins' array instead of nested object.","message":"v2.0.0 changed settings name from 'eslint-plugin-disable' to 'disable/plugins'.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use ESLint CLI --ext to list file extensions for linting.","message":"v1.0.0 removed 'extensions' setting; must use ESLint CLI --ext.","severity":"deprecated","affected_versions":"<2.0.0 >=1.0.0"},{"fix":"Specify plugins to disable, or use 'eslint-plugin-disable-all-except' with explicit list.","message":"Inline comment '/* eslint-plugin-disable */' without plugin names disables ALL registered plugins for that file.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Install: npm install eslint-plugin-disable --save-dev. Then add 'disable' to plugins array.","cause":"Plugin not installed or missing in plugins array in .eslintrc.","error":"ESLint couldn't find the plugin \"eslint-plugin-disable\". (ESLint configuration error)"},{"fix":"Ensure disabled plugins' rules are not applied to those files; plugin suppression occurs after rule loading.","cause":"React plugin is disabled via inline comment or override, but rules are still configured globally; ignores file.","error":"Configuration for rule \"react/jsx-uses-vars\" is invalid: Value \"error\" is the wrong type."},{"fix":"Add 'processor': 'disable/disable' to the relevant override or root config.","cause":"Missing processor: 'disable/disable' in the override or root config.","error":"Processors is not defined in the configuration for file tests/test.js"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}