1 | # function-max-empty-lines
|
2 |
|
3 | Limit the number of adjacent empty lines within functions.
|
4 |
|
5 |
|
6 | ```css
|
7 | a {
|
8 | transform:
|
9 | translate(
|
10 | /* ← */
|
11 | 1, /* ↑ */
|
12 | /* ← */
|
13 | 1 /* ↑ */
|
14 | /* ← */
|
15 | ); /* ↑ */
|
16 | } /* ↑ */
|
17 | /** ↑
|
18 | * These lines */
|
19 | ```
|
20 |
|
21 | The [`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 |
|
27 | For example, with `0`:
|
28 |
|
29 | The following patterns are considered violations:
|
30 |
|
31 |
|
32 | ```css
|
33 | a {
|
34 | transform:
|
35 | translate(
|
36 |
|
37 | 1,
|
38 | 1
|
39 | );
|
40 | }
|
41 | ```
|
42 |
|
43 |
|
44 | ```css
|
45 | a {
|
46 | transform:
|
47 | translate(
|
48 | 1,
|
49 |
|
50 | 1
|
51 | );
|
52 | }
|
53 | ```
|
54 |
|
55 |
|
56 | ```css
|
57 | a {
|
58 | transform:
|
59 | translate(
|
60 | 1,
|
61 | 1
|
62 |
|
63 | );
|
64 | }
|
65 | ```
|
66 |
|
67 | The following patterns are _not_ considered violations:
|
68 |
|
69 |
|
70 | ```css
|
71 | a {
|
72 | transform:
|
73 | translate(
|
74 | 1,
|
75 | 1
|
76 | );
|
77 | }
|
78 | ```
|