eslint-plugin-simple-import-sort
Advanced tools
Changelog
Version 6.0.1 (2020-11-19)
as default
in exports no longer results in invalid code.Changelog
Version 6.0.0 (2020-11-15)
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.Changelog
Version 5.0.2 (2020-03-11)
Changelog
Version 5.0.1 (2020-01-24)
Changelog
Version 5.0.0 (2019-11-22)
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!Changelog
Version 4.0.0 (2019-06-19)
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.