-
-
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.
fix(lint/noDuplicateAtImportRules): correctly handle both single- and…
… double quotes (#2707)
- Loading branch information
1 parent
e825c55
commit 293084b
Showing
3 changed files
with
30 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
2 changes: 2 additions & 0 deletions
2
crates/biome_css_analyze/tests/specs/nursery/noDuplicateAtImportRules/invalidQuotes.css
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,2 @@ | ||
@import "a.css"; | ||
@import 'a.css'; |
26 changes: 26 additions & 0 deletions
26
crates/biome_css_analyze/tests/specs/nursery/noDuplicateAtImportRules/invalidQuotes.css.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,26 @@ | ||
--- | ||
source: crates/biome_css_analyze/tests/spec_tests.rs | ||
expression: invalidQuotes.css | ||
--- | ||
# Input | ||
```css | ||
@import "a.css"; | ||
@import 'a.css'; | ||
``` | ||
|
||
# Diagnostics | ||
``` | ||
invalidQuotes.css:2:2 lint/nursery/noDuplicateAtImportRules ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
! Each @import should be unique unless differing by media queries. | ||
1 │ @import "a.css"; | ||
> 2 │ @import 'a.css'; | ||
│ ^^^^^^^^^^^^^^^ | ||
3 │ | ||
i Consider removing one of the duplicated imports. | ||
``` |