🎉 Compatible with ESLint 10 🎉
Disable autofix for ESLint rules without turning them off.
- Rules still report violations but
eslint --fixand IDE quick-fixes won't change your code - Works with any rule from any plugin — builtin, third-party, scoped, ESM
configure()helper — simplified setup, easy to maintain- Selective modes — disable autofix only, suggestions only, or both
- Lazy loading — plugins loaded on demand
- Monorepo support — pnpm, Nx, Yarn workspaces, Turborepo
- ESLint 9 and 10 flat config
- Zero dependencies
npm i -D eslint-plugin-disable-autofixThe configure() helper handles the boilerplate of disabling the original rule and enabling the prefixed version:
// eslint.config.js
import disableAutofix from 'eslint-plugin-disable-autofix';
export default [
disableAutofix.configure({
'prefer-const': 'warn',
'no-var': 'error',
'@stylistic/semi': ['error', 'always'],
}),
];import disableAutofix from 'eslint-plugin-disable-autofix';
export default [
{
plugins: { 'disable-autofix': disableAutofix },
rules: {
'prefer-const': 'off',
'disable-autofix/prefer-const': 'warn',
},
},
];By default, both autofix and suggestions are disabled. Use createPlugin() to disable one or the other:
import disableAutofix from 'eslint-plugin-disable-autofix';
// Disable autofix only — keep IDE suggestions
const disableFix = disableAutofix.createPlugin({ mode: 'fix' });
// Disable suggestions only — keep autofix
const disableSuggest = disableAutofix.createPlugin({ mode: 'suggest' });
export default [
disableFix.configure({ 'prefer-const': 'warn' }),
disableSuggest.configure({ 'no-console': 'warn' }),
];const limited = disableAutofix.createPlugin({ plugins: ['react', 'unicorn'] });Only wraps rules from the listed plugin prefixes. Builtin ESLint rules are always included.
MIT