File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed
crates/oxc_formatter/tests/ir_transform Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ fn should_sort() {
2828 r#"
2929import { b1, type b2, b3 as b33 } from "b";
3030import * as c from "c";
31- import type d from "d";
31+ import d from "d";
3232import a from "a";
3333"# ,
3434 & FormatOptions {
@@ -39,7 +39,7 @@ import a from "a";
3939import a from "a";
4040import { b1, type b2, b3 as b33 } from "b";
4141import * as c from "c";
42- import type d from "d";
42+ import d from "d";
4343"# ,
4444 ) ;
4545 // Alphabetical ASC order by default
@@ -778,14 +778,12 @@ import c from "c";
778778import z from "z";
779779"# ,
780780 ) ;
781- // Side effect imports stay in their original positions if `sort_side_effects: false`
782781 assert_format (
783782 r#"
784- import c from "c ";
785- import b from "b ";
786- import "s ";
783+ import y from "y ";
784+ import "z ";
785+ import "x ";
787786import a from "a";
788- import z from "z";
789787"# ,
790788 & FormatOptions {
791789 experimental_sort_imports : Some ( SortImports {
@@ -796,12 +794,12 @@ import z from "z";
796794 } ,
797795 r#"
798796import a from "a";
799- import b from "b";
800- import "s";
801- import c from "c";
802- import z from "z";
797+ import "z";
798+ import "x";
799+ import y from "y";
803800"# ,
804801 ) ;
802+ // Keep original order
805803 assert_format (
806804 r#"
807805import "c";
You can’t perform that action at this time.
0 commit comments