Autofixable import and export sorting for ESLint
open sourceMITfree
An ESLint plugin that sorts imports, and exports where possible, when you run eslint --fix, so you never sort them by hand. It handles comments and type imports, works with TypeScript, Prettier, dprint and eslint-plugin-import, and has no dependencies. It doesn't sort require calls.
Problems it solves
- stop arguing about import order in code review
- automatically sort JavaScript and TypeScript imports when I run ESLint
- keep import order consistent without a separate formatter
Features
- sorts imports with eslint --fix
- sorts exports where possible
- keeps comments with their imports
- handles TypeScript type imports and exports
- works alongside Prettier, dprint and eslint-plugin-import
- no dependencies
Limitations
- It doesn't sort require calls.1
Alternatives
The same job
These do what eslint-plugin-simple-import-sort does.
- eslint-plugin-import ESLint rules that validate imports and exports
- typescript-eslint The tooling that lets ESLint and Prettier lint and read TypeScript
- ESLint Find and fix problems in your JavaScript code.
- eslint-import-resolver-typescript TypeScript import resolution for eslint-plugin-import and eslint-plugin-import-x
- Oxc The JavaScript Oxidation Compiler: high-performance JavaScript and TypeScript tools in Rust
- XO Zero-config JavaScript and TypeScript linter built on ESLint
