File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
src/ir_transform/sort_imports Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -365,7 +365,7 @@ fn to_path_kind(source: &str) -> ImportPathKind {
365365 }
366366
367367 // TODO: This can be changed via `options.internalPattern`
368- if source. starts_with ( '~' ) || source. starts_with ( '@' ) {
368+ if source. starts_with ( "~/" ) || source. starts_with ( "@/" ) {
369369 return ImportPathKind :: Internal ;
370370 }
371371
Original file line number Diff line number Diff line change @@ -66,6 +66,22 @@ import("a");
6666import b from "b";
6767import c from "c";
6868import("a");
69+ "# ,
70+ ) ;
71+ assert_format (
72+ r#"
73+ import internal from "~/internal";
74+ import internal2 from "@/internal2";
75+ import external from "external";
76+ import external2 from "@external2";
77+ "# ,
78+ r#"{ "experimentalSortImports": {} }"# ,
79+ r#"
80+ import external2 from "@external2";
81+ import external from "external";
82+
83+ import internal2 from "@/internal2";
84+ import internal from "~/internal";
6985"# ,
7086 ) ;
7187}
You can’t perform that action at this time.
0 commit comments