NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #4098 most downloaded on npm
Easy autofixable import sorting
Last release 2 months ago
16 Jul 2026
Release timing varies
gaps range from 2 weeks to 1.8 years
Nearly every release is documented
notes for 24 of 24 stable releases
1 version withdrawn
withdrawn after publishing
8 years old
29 releases · first in 2018
This is only a breaking change if you use string literals as module export names, and only in the form of that you need to autofix your files.
ES2022 allows string literals as module export names ("arbitrary module namespace names"):
export { yukuTs as "yuku-ts" };
import { "a-b" as c } from "a";
This release adds support for such quotes names. Previously, those were sorted oddly, and the autofix could suggest changes that wasn’t valid syntax.
This is only a breaking change if you use string literals as module export names, and only in the form of that you need to autofix your files.
Thanks to Kamronbek_Juraev (@KAMRONBEK) for fixing this!
It’s only a breaking change if you import from the same source multiple times in the same file (using different styles), and only in the form that you…
This release puts imports from the same source, but with different import styles, in a deterministic order.
// First namespace imports:
import * as Circle from "circle;
// Then default imports:
import createCircle from "circle";
// Then named imports:
import { radius } from "circle";
That is especially useful if you need to have both a namespace import and want to import a few things separately (since that cannot be combined into a single import statement). With the above rule, the imports end up in a deterministic order.
It’s only a breaking change if you import from the same source multiple times in the same file (using different styles), and only in the form that you need to autofix your files.
Thanks to Kannan Goundan (@cakoose)!
One column per quarter.
This release adds a short meta.docs.description to each rule. Thanks to fisker Cheung (@fisker)!
This release adds a short meta.docs.description to each rule. Thanks to fisker Cheung (@fisker)!
This release adds TypeScript type definitions for the plugin itself. This is useful when you use TypeScript to check your ESLint configuration. It ass
This release adds TypeScript type definitions for the plugin itself. This is useful when you use TypeScript to check your ESLint configuration. It assumes that you install @types/eslint yourself. Thanks to @Logicer16!
This release removes the support for import assignments added in version 11.0.0:
This release removes the support for import assignments added in version 11.0.0:
If you miss the support for import assignments, I suggest you write your own ESLint rule which moves them out of the way from the actual imports, sorting them or not.
It’s only a breaking change if you use TypeScript import assignments, and only in the form that you need to autofix your files.
This release adds support for TypeScript import assignments (import A = B.C and import A = require("module")). Thanks to Szabolcs Kurdi (@szku01) and Svyatoslav Zaytsev (@MillerSvt)!
It’s only a breaking change if you use TypeScript import assignments, and only in the form that you need to autofix your files.
In other news, this release adds the meta plugin property in preparation for ESLint Flat Config, and avoids the deprecated context.getSourceCode() method (while still being backwards compatible).
This release might move some imported items with type around. This is a breaking formatting change (that only affects TypeScript and Flow), but only i
This release might move some imported items with type around. This is a breaking formatting change (that only affects TypeScript and Flow), but only in the form of that you need to autofix your files.
In previous versions, type specifiers came first:
import { type B, a } from "a";
export { type B, a } from "a";
Now, all specifiers are sorted alphabetically, regardless of type:
import { a, type B } from "a";
export { a, type B } from "a";
Motivation:
You might import a class for a type annotation using:
<!-- prettier-ignore -->
import {
type MyClass,
coolFunction,
} from "example";
Later, you also start instantiating that class in the same file (new MyClass()), so you remove type.
Previously, this resulted in a messy diff due to the class moving:
import {
- type MyClass,
coolFunction,
+ MyClass,
} from "example";
Now, the sorting with the type keyword would be:
<!-- prettier-ignore -->
import {
coolFunction,
type MyClass,
} from "example";
Now there’s no reordering diff, just the type keyword being removed:
import {
coolFunction,
- type MyClass,
+ MyClass,
} from "example";
This is consistent with [“Why sort on from?”][sort-from].
Thanks to Jake Bailey (@jakebailey) for reporting and suggesting the fix!
Nothing published for this version
This is only a breaking change if you imports or exports in declare module in TypeScript, and only in the form of that you need to autofix your files.
This version adds support for [eslint-plugin-svelte], and for declare module in TypeScript.
More generally, imports and exports are now supported anywhere, by finding the set of parents of all imports and exports and working with those. Previously, the plugin only sorted imports and exports directly inside a Program node. For eslint-plugin-svelte and declare module that didn’t cut it.
This is only a breaking change if you imports or exports in declare module in TypeScript, and only in the form of that you need to autofix your files.
Nothing published for this version
This is only a breaking change if you use the node: prefix in imports, and only in the form of that you need to autofix your files.
Node.js builtin modules prefixed with node: are now in a separate group by default (regex: ^node:), above the packages group. (Node.js builtins without node: are still sorted together with npm packages like before.)
Before:
import fs from "fs";
import _ from "lodash-es";
import { rmSync } from "node:fs";
After:
import { rmSync } from "node:fs";
import fs from "fs";
import _ from "lodash-es";
This is only a breaking change if you use the node: prefix in imports, and only in the form of that you need to autofix your files.
This is only a breaking change if you use the groups option and your regexes care about what the _last_ character is. If so, you now need to account f…
You can now customize where type imports (import type { X } from "x") go, via the groups option. Type imports have \u0000 at the end.
This is only a breaking change if you use the groups option and your regexes care about what the last character is. If so, you now need to account for the fact that the last character of type imports is \u0000.
Nothing published for this version
Fixed: as default in exports no longer results in invalid code.
as default in exports no longer results in invalid code.Renamed: simple-import-sort/sort is now called simple-import-sort/imports.
simple-import-sort/sort is now called simple-import-sort/imports.simple-import-sort/exports for sorting (some) exports. Big thanks to Remco Haszing (@remcohaszing) for the suggestion and great feedback, and to @JCrepin for the initial implementation!../.. imports are now sorted properly based on directory hierarchy.groups option can now be reordered freely without causing imports to unexpectedly end up in other groups than before.Improved: Reduced package size by 50%.
Fixed: The plugin now works with TypeScript 3.8 type imports. Thanks to Liwen Guo (@Livven) and Brandon Chinn (@brandon-leapyear)!
Fixed: Side effect imports now correctly keep their original order in Node.js <12. Thanks to Irvin Zhan (@izhan)!
Added: The groups option for [custom sorting].
groups option for [custom sorting].groups option, the default grouping is ever so slightly different. Now, not only valid npm package names are placed in the “packages” group, but also things that look like npm package names, such as @ui/Section. And anything starting with . is now considered to be a relative import. See [custom sorting] for more information.groups option, and since I don’t use it myself I decided to remove it. Please open an issue if you have something to say about this!Changed: Sorting is now more human – it is case insensitive (matching the default behavior of TSLint, as well as many IDEs) and numbers are sorted by
from paths ending with dots in various ways used to be treated specially. This has now been simplified, which gives a more consistent sorting. Now, "." and ".." are treated as "./" and "../" – and those are the only special cases for “dotty” paths. For example, you might see import x from "." now sorting before import y from "./y".".x" is no longer considered to be a relative import. Only from paths equal to "." or "..", or that start with "./" or "../" are truly relative. This is a bit of an edge case, but if you do have “weird” imports starting with dots in unusual ways you might notice them jumping up to another group of imports.import {} from "a" is no longer considered a side-effect import. Only imports completely lacking the {...} from part are. Remove {} from if you relied on this from earlier versions.Nothing published for this version
Fixed: Semicolon-free code style is now supported. The plugin now leaves a semicolon at the start of a line of code after an import alone.
Added: Support for indentation in Vue tags.
<script> tags.Changed: @/foo imports and similar are now treated as absolute imports. This is a common convention in Vue to avoid ../../../foo imports. Previously,
Changed: @/foo imports and similar are now treated as absolute imports. This is a common convention in Vue to avoid ../../../foo imports. Previously, @/foo ended up among npm packages. This was fixed by turning the absolute imports group into the “rest / trash can” group instead of the packages group. The packages group now only contain valid npm package names and Node.js builtins. The new grouping logic is:
import "./setup": Side effect imports. (These are not sorted internally.)import react from "react": Packages (npm packages and Node.js builtins).import Error from "@/components/error.vue": Absolute imports, full URLs and other imports (such as Vue-style @/foo ones).import a from "./a": Relative imports.Added: [TypeScript] support, via [@typescript-eslint/parser].
Changed: [Flow type imports] are no longer put in their own group at the top. Type imports from npm packages are grouped among regular npm imports, re
from] – to avoid import “jumps” when they change. Previously, changing import type { User } from "./user" into import { type User, getUser } from "./user" caused the line to jump from the top of the file (the type imports group) to further down (the relative imports group). Now it stays in the relative imports group in both cases.- Update readme.
- Update readme.
[@typescript-eslint/parser]: https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser [#7]: https://github.com/lydell/eslint
Your coding agent can read these notes before it upgrades. Set up the MCP server →