-
-
Notifications
You must be signed in to change notification settings - Fork 504
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
40376f9
commit a7d229e
Showing
10 changed files
with
209 additions
and
2,429 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
19 changes: 19 additions & 0 deletions
19
crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/disallowComment.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,19 @@ | ||
a { /* foo */ } | ||
a { | ||
/* foo */ | ||
} | ||
|
||
.b { /* foo */ } | ||
.b { | ||
/* foo */ | ||
} | ||
|
||
@media print { /* foo */ } | ||
@media print { | ||
/* foo */ | ||
} | ||
@media print { | ||
a { | ||
/* foo */ | ||
} | ||
} |
152 changes: 152 additions & 0 deletions
152
crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/disallowComment.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,152 @@ | ||
--- | ||
source: crates/biome_css_analyze/tests/spec_tests.rs | ||
expression: disallowComment.css | ||
--- | ||
# Input | ||
```css | ||
a { /* foo */ } | ||
a { | ||
/* foo */ | ||
} | ||
.b { /* foo */ } | ||
.b { | ||
/* foo */ | ||
} | ||
@media print { /* foo */ } | ||
@media print { | ||
/* foo */ | ||
} | ||
@media print { | ||
a { | ||
/* foo */ | ||
} | ||
} | ||
``` | ||
|
||
# Diagnostics | ||
``` | ||
disallowComment.css:1:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
! Unexpected empty block is not allowed | ||
> 1 │ a { /* foo */ } | ||
│ ^^^^^^^^^^^^^ | ||
2 │ a { | ||
3 │ /* foo */ | ||
i Consider removing the empty block or adding styles inside it. | ||
``` | ||
``` | ||
disallowComment.css:2:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
! Unexpected empty block is not allowed | ||
1 │ a { /* foo */ } | ||
> 2 │ a { | ||
│ ^ | ||
> 3 │ /* foo */ | ||
> 4 │ } | ||
│ ^ | ||
5 │ | ||
6 │ .b { /* foo */ } | ||
i Consider removing the empty block or adding styles inside it. | ||
``` | ||
``` | ||
disallowComment.css:6:4 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
! Unexpected empty block is not allowed | ||
4 │ } | ||
5 │ | ||
> 6 │ .b { /* foo */ } | ||
│ ^^^^^^^^^^^^^ | ||
7 │ .b { | ||
8 │ /* foo */ | ||
i Consider removing the empty block or adding styles inside it. | ||
``` | ||
``` | ||
disallowComment.css:7:4 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
! Unexpected empty block is not allowed | ||
6 │ .b { /* foo */ } | ||
> 7 │ .b { | ||
│ ^ | ||
> 8 │ /* foo */ | ||
> 9 │ } | ||
│ ^ | ||
10 │ | ||
11 │ @media print { /* foo */ } | ||
i Consider removing the empty block or adding styles inside it. | ||
``` | ||
``` | ||
disallowComment.css:11:14 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
! Unexpected empty block is not allowed | ||
9 │ } | ||
10 │ | ||
> 11 │ @media print { /* foo */ } | ||
│ ^^^^^^^^^^^^^ | ||
12 │ @media print { | ||
13 │ /* foo */ | ||
i Consider removing the empty block or adding styles inside it. | ||
``` | ||
``` | ||
disallowComment.css:12:14 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
! Unexpected empty block is not allowed | ||
11 │ @media print { /* foo */ } | ||
> 12 │ @media print { | ||
│ ^ | ||
> 13 │ /* foo */ | ||
> 14 │ } | ||
│ ^ | ||
15 │ @media print { | ||
16 │ a { | ||
i Consider removing the empty block or adding styles inside it. | ||
``` | ||
``` | ||
disallowComment.css:16:5 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
! Unexpected empty block is not allowed | ||
14 │ } | ||
15 │ @media print { | ||
> 16 │ a { | ||
│ ^ | ||
> 17 │ /* foo */ | ||
> 18 │ } | ||
│ ^ | ||
19 │ } | ||
i Consider removing the empty block or adding styles inside it. | ||
``` |
File renamed without changes.
4 changes: 0 additions & 4 deletions
4
crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css
This file was deleted.
Oops, something went wrong.
44 changes: 0 additions & 44 deletions
44
crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css.snap
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.