-
-
Notifications
You must be signed in to change notification settings - Fork 475
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d37cfde
commit 3dd1652
Showing
3 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
crates/biome_js_analyze/tests/specs/nursery/useJsxSortProps/sortedNonAlphabetic.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,20 @@ | ||
/* should not generate diagnostics */ | ||
<Hello | ||
name="John" | ||
tel={5555555} | ||
classes={{ | ||
greetings: classes.greetings, | ||
}} | ||
/>; | ||
|
||
<Hello | ||
tel={5555555} | ||
name="John" | ||
classes={{ | ||
greetings: classes.greetings, | ||
}} | ||
validate | ||
active | ||
onClick={this._handleClick} | ||
onChange={this._handleChange} | ||
/>; |
28 changes: 28 additions & 0 deletions
28
crates/biome_js_analyze/tests/specs/nursery/useJsxSortProps/sortedNonAlphabetic.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,28 @@ | ||
--- | ||
source: crates/biome_js_analyze/tests/spec_tests.rs | ||
expression: sortedNonAlphabetic.jsx | ||
--- | ||
# Input | ||
```jsx | ||
/* should not generate diagnostics */ | ||
<Hello | ||
name="John" | ||
tel={5555555} | ||
classes={{ | ||
greetings: classes.greetings, | ||
}} | ||
/>; | ||
|
||
<Hello | ||
tel={5555555} | ||
name="John" | ||
classes={{ | ||
greetings: classes.greetings, | ||
}} | ||
validate | ||
active | ||
onClick={this._handleClick} | ||
onChange={this._handleChange} | ||
/>; | ||
|
||
``` |
18 changes: 18 additions & 0 deletions
18
crates/biome_js_analyze/tests/specs/nursery/useJsxSortProps/sortedNonAlphabetic.options.json
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,18 @@ | ||
{ | ||
"$schema": "../../../../../../packages/@biomejs/biome/configuration_schema.json", | ||
"linter": { | ||
"rules": { | ||
"nursery": { | ||
"useJsxSortProps": { | ||
"level": "error", | ||
"options": { | ||
"callbacksLast": true, | ||
"multiline": "last", | ||
"noSortAlphabetically": true, | ||
"shorthand": "last" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |