eslint-plugin-simple-import-sort
Advanced tools
Changelog
Version 3.0.0 (2019-02-02)
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.Changelog
Version 2.1.0 (2019-01-26)
Changelog
Version 2.0.0 (2018-11-30)
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.