Skip to content

Commit 6b6f3ca

Browse files
committed
chore: review
1 parent 62c9250 commit 6b6f3ca

File tree

3 files changed

+34
-24
lines changed

3 files changed

+34
-24
lines changed

crates/biome_configuration/src/linter/rules.rs

+19-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/biome_css_analyze/src/lint/nursery/no_unmatchable_anb_selector.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ impl Rule for NoUnmatchableAnbSelector {
8686
.note(markup! {
8787
"Avoid using An+B selectors that always evaluate to 0."
8888
}).note(markup! {
89-
"For more details, see "<Hyperlink href="https://www.w3.org/TR/css-syntax-3/#anb-microsyntax">"this document"</Hyperlink>"."
89+
"For more details, see "<Hyperlink href="https://www.w3.org/TR/css-syntax-3/#anb-microsyntax">"the official spec for An+B selectors"</Hyperlink>"."
9090
})
9191
)
9292
}
@@ -108,6 +108,9 @@ fn is_unmatchable(nth: &AnyCssPseudoClassNth) -> bool {
108108
}
109109
}
110110

111+
// Check if the nth selector is effective within a `not` pseudo class
112+
// Example: a:not(:nth-child(0)) returns true
113+
// a:not(:not(:nth-child(0))) returns false
111114
fn is_within_not_pseudo_class(node: &AnyCssPseudoClassNth) -> bool {
112115
let number_of_not = node
113116
.syntax()

crates/biome_css_analyze/tests/specs/nursery/noUnmatchableAnbSelector/invalid.css.snap

+11-11
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ invalid.css:1:13 lint/nursery/noUnmatchableAnbSelector ━━━━━━━━
3434
3535
i Avoid using An+B selectors that always evaluate to 0.
3636
37-
i For more details, see this document.
37+
i For more details, see the official spec for An+B selectors.
3838
3939
4040
```
@@ -52,7 +52,7 @@ invalid.css:2:13 lint/nursery/noUnmatchableAnbSelector ━━━━━━━━
5252
5353
i Avoid using An+B selectors that always evaluate to 0.
5454
55-
i For more details, see this document.
55+
i For more details, see the official spec for An+B selectors.
5656
5757
5858
```
@@ -71,7 +71,7 @@ invalid.css:3:13 lint/nursery/noUnmatchableAnbSelector ━━━━━━━━
7171
7272
i Avoid using An+B selectors that always evaluate to 0.
7373
74-
i For more details, see this document.
74+
i For more details, see the official spec for An+B selectors.
7575
7676
7777
```
@@ -90,7 +90,7 @@ invalid.css:4:13 lint/nursery/noUnmatchableAnbSelector ━━━━━━━━
9090
9191
i Avoid using An+B selectors that always evaluate to 0.
9292
93-
i For more details, see this document.
93+
i For more details, see the official spec for An+B selectors.
9494
9595
9696
```
@@ -109,7 +109,7 @@ invalid.css:8:13 lint/nursery/noUnmatchableAnbSelector ━━━━━━━━
109109
110110
i Avoid using An+B selectors that always evaluate to 0.
111111
112-
i For more details, see this document.
112+
i For more details, see the official spec for An+B selectors.
113113
114114
115115
```
@@ -128,7 +128,7 @@ invalid.css:9:13 lint/nursery/noUnmatchableAnbSelector ━━━━━━━━
128128
129129
i Avoid using An+B selectors that always evaluate to 0.
130130
131-
i For more details, see this document.
131+
i For more details, see the official spec for An+B selectors.
132132
133133
134134
```
@@ -147,7 +147,7 @@ invalid.css:10:18 lint/nursery/noUnmatchableAnbSelector ━━━━━━━━
147147
148148
i Avoid using An+B selectors that always evaluate to 0.
149149
150-
i For more details, see this document.
150+
i For more details, see the official spec for An+B selectors.
151151
152152
153153
```
@@ -166,7 +166,7 @@ invalid.css:11:15 lint/nursery/noUnmatchableAnbSelector ━━━━━━━━
166166
167167
i Avoid using An+B selectors that always evaluate to 0.
168168
169-
i For more details, see this document.
169+
i For more details, see the official spec for An+B selectors.
170170
171171
172172
```
@@ -185,7 +185,7 @@ invalid.css:12:20 lint/nursery/noUnmatchableAnbSelector ━━━━━━━━
185185
186186
i Avoid using An+B selectors that always evaluate to 0.
187187
188-
i For more details, see this document.
188+
i For more details, see the official spec for An+B selectors.
189189
190190
191191
```
@@ -204,7 +204,7 @@ invalid.css:13:13 lint/nursery/noUnmatchableAnbSelector ━━━━━━━━
204204
205205
i Avoid using An+B selectors that always evaluate to 0.
206206
207-
i For more details, see this document.
207+
i For more details, see the official spec for An+B selectors.
208208
209209
210210
```
@@ -222,7 +222,7 @@ invalid.css:14:18 lint/nursery/noUnmatchableAnbSelector ━━━━━━━━
222222
223223
i Avoid using An+B selectors that always evaluate to 0.
224224
225-
i For more details, see this document.
225+
i For more details, see the official spec for An+B selectors.
226226
227227
228228
```

0 commit comments

Comments
 (0)