-
-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: 韩高钶 <[email protected]> Co-authored-by: Emanuele Stoppa <[email protected]>
- Loading branch information
1 parent
66458a1
commit 799cf2e
Showing
4 changed files
with
42 additions
and
1 deletion.
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
4 changes: 4 additions & 0 deletions
4
crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/issue_3394.jsx
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,4 @@ | ||
<> | ||
<div class={`${variable}-bar ${variable}`}></div> | ||
<div class={`${variable}-bar ${variable}`}></div> | ||
</> |
36 changes: 36 additions & 0 deletions
36
crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/issue_3394.jsx.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,36 @@ | ||
--- | ||
source: crates/biome_js_analyze/tests/spec_tests.rs | ||
assertion_line: 86 | ||
expression: issue_3394.jsx | ||
snapshot_kind: text | ||
--- | ||
# Input | ||
```jsx | ||
<> | ||
<div class={`${variable}-bar ${variable}`}></div> | ||
<div class={`${variable}-bar ${variable}`}></div> | ||
</> | ||
``` | ||
|
||
# Diagnostics | ||
``` | ||
issue_3394.jsx:3:31 lint/nursery/useSortedClasses FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
! These CSS classes should be sorted. | ||
1 │ <> | ||
2 │ <div class={`${variable}-bar ${variable}`}></div> | ||
> 3 │ <div class={`${variable}-bar ${variable}`}></div> | ||
│ ^^^^ | ||
4 │ </> | ||
i Unsafe fix: Sort the classes. | ||
1 1 │ <> | ||
2 2 │ <div class={`${variable}-bar ${variable}`}></div> | ||
3 │ - ··<div·class={`${variable}-bar····${variable}`}></div> | ||
3 │ + ··<div·class={`${variable}-bar·${variable}`}></div> | ||
4 4 │ </> | ||
``` |