ESLint plugin that extends the built-in sort-keys rule with automatic fix capability. Version 1.1.2 is the latest stable release. This plugin sorts object keys alphabetically and provides autofix on save, unlike the core rule which only reports errors. It supports all native sort-keys options except minKeys and works with ESLint's --fix flag. Maintained as a fork with occasional updates, it's a convenient tool for enforcing consistent key ordering without manual effort.
npm install eslint-plugin-sort-keys-fixVerified import paths — ran on the pinned version, not inferred.
Enable the sort-keys-fix rule with autofix in ESLint config. Object keys will be sorted alphabetically.
Use ESLint's --fix flag or editor integration to trigger autofix.
Do not use minKeys option; it will be ignored or cause errors.
Update to 1.1.2 or review sorting behavior for objects with spread operators.
npm install eslint-plugin-sort-keys-fix --save-dev
Use severity string directly: "sort-keys-fix/sort-keys-fix": "warn"
Add 'plugins: ["sort-keys-fix"]' in ESLint config.