UNPKG

1.15 kBMarkdownView Raw
1# selector-max-empty-lines
2
3Limit the number of adjacent empty lines within selectors.
4
5<!-- prettier-ignore -->
6```css
7a,
8 /* ← */
9b { /* ↑ */
10 color: red; /* ↑ */
11} /* ↑ */
12/** ↑
13 * This empty line */
14```
15
16The [`fix` option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule.
17
18## Options
19
20`int`: Maximum number of adjacent empty lines allowed.
21
22For example, with `0`:
23
24The following patterns are considered violations:
25
26<!-- prettier-ignore -->
27```css
28a
29
30b {
31 color: red;
32}
33```
34
35<!-- prettier-ignore -->
36```css
37a,
38
39b {
40 color: red;
41}
42```
43
44<!-- prettier-ignore -->
45```css
46a
47
48>
49b {
50 color: red;
51}
52```
53
54<!-- prettier-ignore -->
55```css
56a
57>
58
59b {
60 color: red;
61}
62```
63
64The following patterns are _not_ considered violations:
65
66<!-- prettier-ignore -->
67```css
68a b {
69 color: red;
70}
71```
72
73<!-- prettier-ignore -->
74```css
75a
76b {
77 color: red;
78}
79```
80
81<!-- prettier-ignore -->
82```css
83a,
84b {
85 color: red;
86}
87```
88
89<!-- prettier-ignore -->
90```css
91a > b {
92 color: red;
93}
94```
95
96<!-- prettier-ignore -->
97```css
98a
99>
100b {
101 color: red;
102}
103```