Registry / testing / eslint-plugin-no-autofix

eslint-plugin-no-autofix

JSON →
library2.1.0jsnpmunverified

ESLint plugin that wraps any rule to disable its autofix behavior, allowing rules to report warnings without automatically fixing them. Current stable version is 2.1.0, released September 2024. Requires Node >= 18 and ESLint >= 8. The plugin supports all ESLint core rules and third-party plugin rules by simply prefixing the rule name with 'no-autofix/'. It is particularly useful for teams that want to enforce certain rules (like prefer-const) but avoid automatic code modifications that might conflict with other tools or team conventions. Unlike alternatives (e.g., using eslint --no-fix), this provides per-rule granularity.

npm install eslint-plugin-no-autofix
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-NO-A
E
eslint-plugin-no-autofix
testingjavascriptv2.1.0
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.

plugin (default export)
import noAutofix from 'eslint-plugin-no-autofix'
const noAutofix = require('eslint-plugin-no-autofix')
ESM-only since v2.0.0; CJS require will fail on Node >= 18.
flat config (ESLint v9 compatible)
import noAutofix from 'eslint-plugin-no-autofix'; export default [ { plugins: { 'no-autofix': noAutofix }, rules: { 'no-autofix/prefer-const': 'error' } } ]
module.exports = { plugins: ['no-autofix'], rules: { 'no-autofix/prefer-const': 'error' } }
Flat config was introduced in ESLint v9; the old .eslintrc style is deprecated.
rules object (advanced usage)
import { rules } from 'eslint-plugin-no-autofix'
import { noAutofix } from 'eslint-plugin-no-autofix'
The named export 'rules' gives direct access to the rule factory, but the recommended way is to use the default export as a plugin object.

Demonstrates how to configure eslint-plugin-no-autofix with flat config, disabling the original rule and enabling the no-autofix variant for core and plugin rules.

// Install: npm i eslint-plugin-no-autofix -D // eslint.config.js (flat config, ESLint v9+) import noAutofix from 'eslint-plugin-no-autofix'; export default [ { plugins: { 'no-autofix': noAutofix }, rules: { // Disable the original rule 'prefer-const': 'off', // Enable no-autofix version 'no-autofix/prefer-const': 'error', // Works with plugin rules too 'react/jsx-indent': 'off', 'no-autofix/react/jsx-indent': 'error' } } ];
Debug
Known issues
breakingv2.0.0 dropped support for ESLint < 8 and Node < 18. Flat config is now expected.
fix
Upgrade to Node >= 18 and ESLint >= 8. If using .eslintrc, stay on v1.x or migrate to flat config.
affects: >=2.0.0
gotchaThe plugin only disables the autofix modifier; the rule still reports the same warnings. If you want to completely disable a rule, use 'off' on the original, not 'no-autofix/rule' alone.
fix
Always set the original rule to 'off' when using the no-autofix variant to avoid duplicate warnings.
affects: >=1.0.0
gotchaWhen using the old .eslintrc style, plugin must be listed in 'plugins' array, and the rule prefix must be 'no-autofix/'. Omitting the plugin declaration will cause an error.
fix
Add 'no-autofix' to the plugins array in your ESLint config.
affects: >=1.0.0
deprecatedThe .eslintrc format (JSON, YAML, JS) is deprecated in ESLint v9. Use flat config (eslint.config.js) instead.
fix
Migrate to eslint.config.js with flat config as shown in Quickstart.
affects: >=2.0.0
Errors
Common errors & fixes
Error: Failed to load plugin 'no-autofix' declared in 'plugins' array of my config: Cannot find module 'eslint-plugin-no-autofix'
Plugin not installed or misspelled.
fix
Run 'npm install eslint-plugin-no-autofix --save-dev' and verify the spelling in your config.
Error: Cannot find module 'eslint-plugin-no-autofix' require() of ES Module not supported
Using CJS require() with ESM-only package (v2+).
fix
Use import syntax (ESM) or downgrade to v1.x with require() and Node < 18.
ESLint: Definition for rule 'no-autofix/prefer-const' was not found.
Rule prefix is correct but plugin not registered in 'plugins' array.
fix
Make sure to add 'no-autofix' to the plugins list in your ESLint config.
Upgrade
Version history
2.1.0latest on npm
Audit
Dependencies
eslintrequiredpeer dependency, required at runtime to apply the plugin
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-plugin-no-autofix — npm install eslint-plugin-no-autofix · libregistry