UNPKG

1.24 kBMarkdownView Raw
1# no-eol-whitespace
2
3Disallow end-of-line whitespace.
4
5<!-- prettier-ignore -->
6```css
7a { color: pink; }···
8/** ↑
9 * This whitespace */
10```
11
12The [`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
18The following patterns are considered violations:
19
20<!-- prettier-ignore -->
21```css
22a { color: pink; }·
23```
24
25<!-- prettier-ignore -->
26```css
27a { color: pink; }····
28```
29
30Comment strings are also checked -- so the following is a violation:
31
32<!-- prettier-ignore -->
33```css
34/* something····
35 * something else */
36```
37
38The following patterns are _not_ considered violations:
39
40<!-- prettier-ignore -->
41```css
42a { color: pink; }
43```
44
45<!-- prettier-ignore -->
46```css
47/* something
48 * something else */
49```
50
51## Optional secondary options
52
53### `ignore: ["empty-lines"]`
54
55#### `"empty-lines"`
56
57Allow end-of-line whitespace for lines that are only whitespace, "empty" lines.
58
59The following patterns are _not_ considered violations:
60
61<!-- prettier-ignore -->
62```css
63a {
64 color: pink;
65··
66 background: orange;
67}
68```
69
70<!-- prettier-ignore -->
71```css
72····
73```
74
75<!-- prettier-ignore -->
76```css
77a { color: pink; }
78····
79```