-
-
Notifications
You must be signed in to change notification settings - Fork 476
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(organizeImport): ignorer side effect imports
Fixes: #817
- Loading branch information
Showing
6 changed files
with
76 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
crates/biome_js_analyze/tests/specs/correctness/organizeImports/side-effect-imports.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import "z" | ||
import { D } from "d"; | ||
import { C } from "c"; | ||
import "y" | ||
import "x" | ||
import { B } from "b"; | ||
import { A } from "a"; | ||
import "w" |
32 changes: 32 additions & 0 deletions
32
crates/biome_js_analyze/tests/specs/correctness/organizeImports/side-effect-imports.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
source: crates/biome_js_analyze/tests/spec_tests.rs | ||
expression: side-effect-imports.js | ||
--- | ||
# Input | ||
```jsx | ||
import "z" | ||
import { D } from "d"; | ||
import { C } from "c"; | ||
import "y" | ||
import "x" | ||
import { B } from "b"; | ||
import { A } from "a"; | ||
import "w" | ||
``` | ||
|
||
# Actions | ||
```diff | ||
@@ -1,8 +1,8 @@ | ||
import "z" | ||
+import { C } from "c"; | ||
import { D } from "d"; | ||
-import { C } from "c"; | ||
import "y" | ||
import "x" | ||
+import { A } from "a"; | ||
import { B } from "b"; | ||
-import { A } from "a"; | ||
import "w" | ||
\ No newline at end of file | ||
|
||
``` |