Sorry, maybe I’m not being clear - I’m not talking about sorting. I’m talking about an ESLint rule that flags alias imports that can be expressed as relative subdirectory imports, but flags other imports that could have been alias imports. Does that make sense?
Examples:
// we're in @/lib/foo// correctimport A from"./foobar/a"import B from"./b"import C from"@/lib/c"import D from"@/d"// incorrectimport A from"@/lib/foo/foobar/a"import B from"@/lib/foo/b"
Sorry, maybe I’m not being clear - I’m not talking about sorting. I’m talking about an ESLint rule that flags alias imports that can be expressed as relative subdirectory imports, but flags other imports that could have been alias imports. Does that make sense?
Examples:
// we're in @/lib/foo // correct import A from "./foobar/a" import B from "./b" import C from "@/lib/c" import D from "@/d" // incorrect import A from "@/lib/foo/foobar/a" import B from "@/lib/foo/b"