Skip to content

Commit

Permalink
fix(biome_css_analyzer): update lint error messages (#2545)
Browse files Browse the repository at this point in the history
  • Loading branch information
togami2864 authored Apr 21, 2024
1 parent 7341677 commit edf02c1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ impl Rule for NoDuplicateFontNames {
rule_category!(),
span,
markup! {
"Unexpected duplicate font name: "<Emphasis>{ state.value }</Emphasis>
"Duplicate font names are redundant and unnecessary: "<Emphasis>{ state.value }</Emphasis>
},
)
.note(markup! {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl Rule for NoDuplicateSelectorsKeyframeBlock {
rule_category!(),
node.range(),
markup! {
"Unexpected duplicate selector: "<Emphasis>{node.text()}</Emphasis>
"The duplicate keyframe selector is overwritten by later one."
},
)
.note(markup! {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ b { font: normal 14px/32px -apple-system, BlinkMacSystemFont, sans-serif, sans-s
```
invalid.css:1:56 lint/nursery/noDuplicateFontNames ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Unexpected duplicate font name: sans-serif
! Duplicate font names are redundant and unnecessary: sans-serif
> 1 │ a { font-family: "Lucida Grande", 'Arial', sans-serif, sans-serif; }
│ ^^^^^^^^^^
Expand All @@ -31,7 +31,7 @@ invalid.css:1:56 lint/nursery/noDuplicateFontNames ━━━━━━━━━
```
invalid.css:2:44 lint/nursery/noDuplicateFontNames ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Unexpected duplicate font name: Arial
! Duplicate font names are redundant and unnecessary: Arial
1 │ a { font-family: "Lucida Grande", 'Arial', sans-serif, sans-serif; }
> 2 │ a { font-family: 'Arial', "Lucida Grande", Arial, sans-serif; }
Expand All @@ -47,7 +47,7 @@ invalid.css:2:44 lint/nursery/noDuplicateFontNames ━━━━━━━━━
```
invalid.css:3:35 lint/nursery/noDuplicateFontNames ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Unexpected duplicate font name: LucidaGrande
! Duplicate font names are redundant and unnecessary: LucidaGrande
1 │ a { font-family: "Lucida Grande", 'Arial', sans-serif, sans-serif; }
2 │ a { font-family: 'Arial', "Lucida Grande", Arial, sans-serif; }
Expand All @@ -64,7 +64,7 @@ invalid.css:3:35 lint/nursery/noDuplicateFontNames ━━━━━━━━━
```
invalid.css:4:27 lint/nursery/noDuplicateFontNames ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Unexpected duplicate font name: Times
! Duplicate font names are redundant and unnecessary: Times
2 │ a { font-family: 'Arial', "Lucida Grande", Arial, sans-serif; }
3 │ a { fOnT-fAmIlY: "Lucida Grande", ' Lucida Grande ', sans-serif; }
Expand All @@ -81,7 +81,7 @@ invalid.css:4:27 lint/nursery/noDuplicateFontNames ━━━━━━━━━
```
invalid.css:5:39 lint/nursery/noDuplicateFontNames ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Unexpected duplicate font name: Arial
! Duplicate font names are redundant and unnecessary: Arial
3 │ a { fOnT-fAmIlY: "Lucida Grande", ' Lucida Grande ', sans-serif; }
4 │ a { font-family: 'Times', Times }
Expand All @@ -97,7 +97,7 @@ invalid.css:5:39 lint/nursery/noDuplicateFontNames ━━━━━━━━━
```
invalid.css:6:75 lint/nursery/noDuplicateFontNames ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Unexpected duplicate font name: sans-serif
! Duplicate font names are redundant and unnecessary: sans-serif
4 │ a { font-family: 'Times', Times }
5 │ a { FONT: italic 300 16px/30px Arial, " Arial", serif; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ expression: invalid.css
```
invalid.css:1:26 lint/nursery/noDuplicateSelectorsKeyframeBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Unexpected duplicate selector: from
! The duplicate keyframe selector is overwritten by later one.
> 1 │ @keyframes foo { from {} from {}}
│ ^^^^
Expand All @@ -38,7 +38,7 @@ invalid.css:1:26 lint/nursery/noDuplicateSelectorsKeyframeBlock ━━━━━
```
invalid.css:3:26 lint/nursery/noDuplicateSelectorsKeyframeBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Unexpected duplicate selector: FROM
! The duplicate keyframe selector is overwritten by later one.
1 │ @keyframes foo { from {} from {}}
2 │
Expand All @@ -55,7 +55,7 @@ invalid.css:3:26 lint/nursery/noDuplicateSelectorsKeyframeBlock ━━━━━
```
invalid.css:5:24 lint/nursery/noDuplicateSelectorsKeyframeBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Unexpected duplicate selector: 0%
! The duplicate keyframe selector is overwritten by later one.
3 │ @keyframes foo { from {} FROM {}}
4 │
Expand All @@ -72,7 +72,7 @@ invalid.css:5:24 lint/nursery/noDuplicateSelectorsKeyframeBlock ━━━━━
```
invalid.css:7:32 lint/nursery/noDuplicateSelectorsKeyframeBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Unexpected duplicate selector: to
! The duplicate keyframe selector is overwritten by later one.
5 │ @keyframes foo { 0% {} 0% {}}
6 │
Expand All @@ -89,7 +89,7 @@ invalid.css:7:32 lint/nursery/noDuplicateSelectorsKeyframeBlock ━━━━━
```
invalid.css:9:24 lint/nursery/noDuplicateSelectorsKeyframeBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Unexpected duplicate selector: 0%
! The duplicate keyframe selector is overwritten by later one.
7 │ @keyframes foo { from {} to {} to {} }
8 │
Expand All @@ -106,7 +106,7 @@ invalid.css:9:24 lint/nursery/noDuplicateSelectorsKeyframeBlock ━━━━━
```
invalid.css:11:32 lint/nursery/noDuplicateSelectorsKeyframeBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Unexpected duplicate selector: 0%
! The duplicate keyframe selector is overwritten by later one.
9 │ @keyframes foo { 0% {} 0% {} 100% {} }
10 │
Expand All @@ -123,7 +123,7 @@ invalid.css:11:32 lint/nursery/noDuplicateSelectorsKeyframeBlock ━━━━━
```
invalid.css:13:29 lint/nursery/noDuplicateSelectorsKeyframeBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Unexpected duplicate selector: 0%
! The duplicate keyframe selector is overwritten by later one.
11 │ @-webkit-keyframes foo { 0% {} 0% {} 100% {} }
12 │
Expand Down

0 comments on commit edf02c1

Please sign in to comment.