Registry / testing / eslint-plugin-autofix

eslint-plugin-autofix

JSON →
library2.2.0jsnpmunverified

An ESLint plugin (v2.2.0) that wraps ESLint core and custom rules to provide autofix functionality. It converts original fixable rules into autofixable versions by applying fixes automatically. Requires Node.js >=18 and ESLint >=8. The plugin prefixes rule names with 'autofix/' and includes a wide range of ESLint built-in rules. Released as part of a monorepo with similar plugins like eslint-plugin-no-autofix. Supports ESLint v9 as of v2.0.0. Differentiator: enables autofix for rules that are normally not fixable, but does not modify the original rule behavior.

testing
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.

ESM import is preferred; CommonJS require still works but import is recommended for modern projects.

import autofix from 'eslint-plugin-autofix';

The plugin is a default export, not named exports. Access rules via autofix.rules.

import autofix from 'eslint-plugin-autofix'; // then use autofix.rules

Configs are exported as part of the default object. Use autofix.configs to access recommended config.

import autofix from 'eslint-plugin-autofix'; // then use autofix.configs

Example ESLint configuration using eslint-plugin-autofix to enable autofix for no-debugger and no-unused-vars rules.

// .eslintrc.js module.exports = { plugins: ['autofix'], rules: { 'autofix/no-debugger': 'error', 'autofix/no-unused-vars': ['error', { args: 'none' }], }, };
Debug
Known footguns
breakingv2.0.0 dropped support for ESLint <8 and Node.js <18. Upgrade to ESLint 8+ and Node 18+.
deprecatedThe plugin may not be actively maintained; check the repository for recent updates. Last release was v2.2.0 in 2024-09.
gotchaRule names must be prefixed with 'autofix/' in the eslintrc rules object. Omitting the prefix will use the original ESLint rule without autofix.
gotchaThe plugin does not modify the original rule's behavior; it only applies fixes to the reported errors. Some rules may not produce fixes even if the rule name is prefixed.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
10 hits · last 30 days
gptbot
4
ahrefsbot
4
script
1
meta-externalagent
1
Resources