1 | # selector-combinator-disallowed-list
|
2 |
|
3 | Specify a list of disallowed combinators.
|
4 |
|
5 |
|
6 | ```css
|
7 | a + b {}
|
8 | /** ↑
|
9 | * This combinator */
|
10 | ```
|
11 |
|
12 | This rule normalizes the whitespace descendant combinator to be a single space.
|
13 |
|
14 | This rule ignores [reference combinators](https://www.w3.org/TR/selectors4/#idref-combinators) e.g. `/for/`.
|
15 |
|
16 | ## Options
|
17 |
|
18 | `array|string`: `["array", "of", "combinators"]|"combinator"`
|
19 |
|
20 | Given:
|
21 |
|
22 | ```
|
23 | [">", " "]
|
24 | ```
|
25 |
|
26 | The following patterns are considered violations:
|
27 |
|
28 |
|
29 | ```css
|
30 | a > b {}
|
31 | ```
|
32 |
|
33 |
|
34 | ```css
|
35 | a b {}
|
36 | ```
|
37 |
|
38 |
|
39 | ```css
|
40 | a
|
41 | b {}
|
42 | ```
|
43 |
|
44 | The following patterns are _not_ considered violations:
|
45 |
|
46 |
|
47 | ```css
|
48 | a + b {}
|
49 | ```
|
50 |
|
51 |
|
52 | ```css
|
53 | a ~ b {}
|
54 | ```
|