UNPKG

1.1 kBMarkdownView Raw
1# function-max-empty-lines
2
3Limit the number of adjacent empty lines within functions.
4
5<!-- prettier-ignore -->
6```css
7a {
8 transform:
9 translate(
10 /* ← */
11 1, /* ↑ */
12 /* ← */
13 1 /* ↑ */
14 /* ← */
15 ); /* ↑ */
16} /* ↑ */
17/** ↑
18 * These lines */
19```
20
21The [`fix` option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule.
22
23## Options
24
25`int`: Maximum number of adjacent empty lines allowed.
26
27For example, with `0`:
28
29The following patterns are considered violations:
30
31<!-- prettier-ignore -->
32```css
33a {
34 transform:
35 translate(
36
37 1,
38 1
39 );
40}
41```
42
43<!-- prettier-ignore -->
44```css
45a {
46 transform:
47 translate(
48 1,
49
50 1
51 );
52}
53```
54
55<!-- prettier-ignore -->
56```css
57a {
58 transform:
59 translate(
60 1,
61 1
62
63 );
64}
65```
66
67The following patterns are _not_ considered violations:
68
69<!-- prettier-ignore -->
70```css
71a {
72 transform:
73 translate(
74 1,
75 1
76 );
77}
78```