Auto-fixable sort rules for ESLint. Current stable version is 4.0.0 (October 2024), released with semantic versioning and a monthly release cadence. Key differentiators include native TypeScript support, recommended configuration, support for both flat and legacy ESLint configs, and rules that sort imports, exports, destructuring, object properties, type properties, string enums, and string unions with auto-fix. Compared to alternatives like eslint-plugin-import/order, it offers a narrower focus on sorting with simpler configuration.
npm install eslint-plugin-sortVerified import paths — ran on the pinned version, not inferred.
Setup ESLint flat config with eslint-plugin-sort, enabling recommended rules and customizing import sorting groups.
Upgrade ESLint to >=8.56.0
Upgrade ESLint to >=8
Upgrade to v2.11.0+ or use legacy config
Override rule severity to 'error' or 'off' as needed
Review migration guide for new default groups
Run `npm install -D eslint-plugin-sort` and ensure the import is correct
Upgrade ESLint to >=8.56.0
Use spread operator: `export default [...sort.configs['flat/recommended'], ...]`