Skip to content

Commit

Permalink
test: add more test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
isnakode committed Apr 20, 2024
1 parent a4a5d10 commit 7b3e87a
Show file tree
Hide file tree
Showing 7 changed files with 97 additions and 11 deletions.
4 changes: 3 additions & 1 deletion crates/biome_configuration/src/linter/rules.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,12 @@

@keyframes foo { from {} FROM {}}

@keyframes foo { 0% {} 0% {}}
@keyframes foo { 0% {} 0% {}}

@keyframes foo { from {} to {} to {} }

@keyframes foo { 0% {} 0% {} 100% {} }

@-webkit-keyframes foo { 0% {} 0% {} 100% {} }

@-moz-keyframes foo { 0% {} 0% {} 100% {} }
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ expression: invalid.css
@keyframes foo { from {} FROM {}}
@keyframes foo { 0% {} 0% {}}
@keyframes foo { from {} to {} to {} }
@keyframes foo { 0% {} 0% {} 100% {} }
@-webkit-keyframes foo { 0% {} 0% {} 100% {} }
@-moz-keyframes foo { 0% {} 0% {} 100% {} }
```

# Diagnostics
Expand All @@ -22,7 +30,7 @@ invalid.css:1:26 lint/nursery/noDuplicateSelectorsKeyframeBlock ━━━━━
2 │
3 │ @keyframes foo { from {} FROM {}}
i Consider using different selector here!
i Consider using a different percentage value or keyword to avoid duplication
```
Expand All @@ -39,7 +47,7 @@ invalid.css:3:26 lint/nursery/noDuplicateSelectorsKeyframeBlock ━━━━━
4 │
5 │ @keyframes foo { 0% {} 0% {}}
i Consider using different selector here!
i Consider using a different percentage value or keyword to avoid duplication
```
Expand All @@ -53,8 +61,76 @@ invalid.css:5:24 lint/nursery/noDuplicateSelectorsKeyframeBlock ━━━━━
4 │
> 5 │ @keyframes foo { 0% {} 0% {}}
│ ^^
6 │
7 │ @keyframes foo { from {} to {} to {} }
i Consider using a different percentage value or keyword to avoid duplication
```

```
invalid.css:7:32 lint/nursery/noDuplicateSelectorsKeyframeBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Unexpected duplicate selector: to
5 │ @keyframes foo { 0% {} 0% {}}
6 │
> 7 │ @keyframes foo { from {} to {} to {} }
│ ^^
8 │
9 │ @keyframes foo { 0% {} 0% {} 100% {} }
i Consider using a different percentage value or keyword to avoid duplication
```

```
invalid.css:9:24 lint/nursery/noDuplicateSelectorsKeyframeBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Unexpected duplicate selector: 0%
7 │ @keyframes foo { from {} to {} to {} }
8 │
> 9 │ @keyframes foo { 0% {} 0% {} 100% {} }
│ ^^
10 │
11 │ @-webkit-keyframes foo { 0% {} 0% {} 100% {} }
i Consider using a different percentage value or keyword to avoid duplication
```

```
invalid.css:11:32 lint/nursery/noDuplicateSelectorsKeyframeBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Unexpected duplicate selector: 0%
9 │ @keyframes foo { 0% {} 0% {} 100% {} }
10 │
> 11 │ @-webkit-keyframes foo { 0% {} 0% {} 100% {} }
│ ^^
12 │
13 │ @-moz-keyframes foo { 0% {} 0% {} 100% {} }
i Consider using a different percentage value or keyword to avoid duplication
```

```
invalid.css:13:29 lint/nursery/noDuplicateSelectorsKeyframeBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Unexpected duplicate selector: 0%
11 │ @-webkit-keyframes foo { 0% {} 0% {} 100% {} }
12 │
> 13 │ @-moz-keyframes foo { 0% {} 0% {} 100% {} }
│ ^^
i Consider using different selector here!
i Consider using a different percentage value or keyword to avoid duplication
```
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@keyframes foo { from {} to {}}
@keyframes foo { from {} to {} }

@keyframes foo { 0% {} 100% {}}
@keyframes foo { 0% {} 100% {} }
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ expression: valid.css
---
# Input
```css
@keyframes foo { from {} to {}}
@keyframes foo { from {} to {} }
@keyframes foo { 0% {} 100% {}}
@keyframes foo { 0% {} 100% {} }
```
2 changes: 1 addition & 1 deletion packages/@biomejs/backend-jsonrpc/src/workspace.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/@biomejs/biome/configuration_schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7b3e87a

Please sign in to comment.