1 | # no-eol-whitespace
|
2 |
|
3 | Disallow end-of-line whitespace.
|
4 |
|
5 |
|
6 | ```css
|
7 | a { color: pink; }···
|
8 | /** ↑
|
9 | * This whitespace */
|
10 | ```
|
11 |
|
12 | The [`fix` option](../../../docs/user-guide/usage/options.md#fix) can automatically fix most of the problems reported by this rule.
|
13 |
|
14 | ## Options
|
15 |
|
16 | ### `true`
|
17 |
|
18 | The following patterns are considered violations:
|
19 |
|
20 |
|
21 | ```css
|
22 | a { color: pink; }·
|
23 | ```
|
24 |
|
25 |
|
26 | ```css
|
27 | a { color: pink; }····
|
28 | ```
|
29 |
|
30 | Comment strings are also checked -- so the following is a violation:
|
31 |
|
32 |
|
33 | ```css
|
34 | /* something····
|
35 | * something else */
|
36 | ```
|
37 |
|
38 | The following patterns are _not_ considered violations:
|
39 |
|
40 |
|
41 | ```css
|
42 | a { color: pink; }
|
43 | ```
|
44 |
|
45 |
|
46 | ```css
|
47 | /* something
|
48 | * something else */
|
49 | ```
|
50 |
|
51 | ## Optional secondary options
|
52 |
|
53 | ### `ignore: ["empty-lines"]`
|
54 |
|
55 | #### `"empty-lines"`
|
56 |
|
57 | Allow end-of-line whitespace for lines that are only whitespace, "empty" lines.
|
58 |
|
59 | The following patterns are _not_ considered violations:
|
60 |
|
61 |
|
62 | ```css
|
63 | a {
|
64 | color: pink;
|
65 | ··
|
66 | background: orange;
|
67 | }
|
68 | ```
|
69 |
|
70 |
|
71 | ```css
|
72 | ····
|
73 | ```
|
74 |
|
75 |
|
76 | ```css
|
77 | a { color: pink; }
|
78 | ····
|
79 | ```
|