-
-
Notifications
You must be signed in to change notification settings - Fork 380
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
e97271b
commit 7495e81
Showing
5 changed files
with
120 additions
and
2 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
29 changes: 29 additions & 0 deletions
29
.../biome_css_analyze/tests/specs/nursery/noInvalidPositionAtImportRule/invalid.css.snap.new
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,29 @@ | ||
--- | ||
source: crates/biome_css_analyze/tests/spec_tests.rs | ||
assertion_line: 83 | ||
expression: invalid.css | ||
--- | ||
# Input | ||
```css | ||
a {} | ||
@import 'foo.css'; | ||
|
||
``` | ||
|
||
# Diagnostics | ||
``` | ||
invalid.css:2:2 lint/nursery/noInvalidPositionAtImportRule ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
|
||
! This @import is in the wrong position. | ||
|
||
1 │ a {} | ||
> 2 │ @import 'foo.css'; | ||
│ ^^^^^^^^^^^^^^^^^ | ||
3 │ | ||
|
||
i Consider moving import position. | ||
|
||
i Any @import rules must precede all other valid at-rules and style rules in a stylesheet (ignoring @charset and @layer), or else the @import rule is invalid. | ||
|
||
|
||
``` |
31 changes: 31 additions & 0 deletions
31
...alyze/tests/specs/nursery/noInvalidPositionAtImportRule/invalidBetweenImport.css.snap.new
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,31 @@ | ||
--- | ||
source: crates/biome_css_analyze/tests/spec_tests.rs | ||
assertion_line: 83 | ||
expression: invalidBetweenImport.css | ||
--- | ||
# Input | ||
```css | ||
@import 'foo.css'; | ||
a {} | ||
@import 'bar.css'; | ||
|
||
``` | ||
|
||
# Diagnostics | ||
``` | ||
invalidBetweenImport.css:3:2 lint/nursery/noInvalidPositionAtImportRule ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
|
||
! This @import is in the wrong position. | ||
|
||
1 │ @import 'foo.css'; | ||
2 │ a {} | ||
> 3 │ @import 'bar.css'; | ||
│ ^^^^^^^^^^^^^^^^^ | ||
4 │ | ||
|
||
i Consider moving import position. | ||
|
||
i Any @import rules must precede all other valid at-rules and style rules in a stylesheet (ignoring @charset and @layer), or else the @import rule is invalid. | ||
|
||
|
||
``` |
29 changes: 29 additions & 0 deletions
29
...analyze/tests/specs/nursery/noInvalidPositionAtImportRule/invalidMediaImport.css.snap.new
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,29 @@ | ||
--- | ||
source: crates/biome_css_analyze/tests/spec_tests.rs | ||
assertion_line: 83 | ||
expression: invalidMediaImport.css | ||
--- | ||
# Input | ||
```css | ||
@media print {} | ||
@import url('foo.css'); | ||
|
||
``` | ||
|
||
# Diagnostics | ||
``` | ||
invalidMediaImport.css:2:2 lint/nursery/noInvalidPositionAtImportRule ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
|
||
! This @import is in the wrong position. | ||
|
||
1 │ @media print {} | ||
> 2 │ @import url('foo.css'); | ||
│ ^^^^^^^^^^^^^^^^^^^^^^ | ||
3 │ | ||
|
||
i Consider moving import position. | ||
|
||
i Any @import rules must precede all other valid at-rules and style rules in a stylesheet (ignoring @charset and @layer), or else the @import rule is invalid. | ||
|
||
|
||
``` |
29 changes: 29 additions & 0 deletions
29
...ests/specs/nursery/noInvalidPositionAtImportRule/invalidMediaImportUpperCase.css.snap.new
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,29 @@ | ||
--- | ||
source: crates/biome_css_analyze/tests/spec_tests.rs | ||
assertion_line: 83 | ||
expression: invalidMediaImportUpperCase.css | ||
--- | ||
# Input | ||
```css | ||
@media print {} | ||
@imPort URl('foo.css'); | ||
|
||
``` | ||
|
||
# Diagnostics | ||
``` | ||
invalidMediaImportUpperCase.css:2:2 lint/nursery/noInvalidPositionAtImportRule ━━━━━━━━━━━━━━━━━━━━━ | ||
|
||
! This @import is in the wrong position. | ||
|
||
1 │ @media print {} | ||
> 2 │ @imPort URl('foo.css'); | ||
│ ^^^^^^^^^^^^^^^^^^^^^^ | ||
3 │ | ||
|
||
i Consider moving import position. | ||
|
||
i Any @import rules must precede all other valid at-rules and style rules in a stylesheet (ignoring @charset and @layer), or else the @import rule is invalid. | ||
|
||
|
||
``` |