1 | # at-rule-semicolon-newline-after
|
2 |
|
3 | Require a newline after the semicolon of at-rules.
|
4 |
|
5 |
|
6 | ```css
|
7 | @import url("x.css");
|
8 | @import url("y.css");
|
9 | /** ↑
|
10 | * The newline after these semicolons */
|
11 | ```
|
12 |
|
13 | This rule allows an end-of-line comment followed by a newline. For example:
|
14 |
|
15 |
|
16 | ```css
|
17 | @import url("x.css"); /* end-of-line comment */
|
18 |
|
19 | a {}
|
20 | ```
|
21 |
|
22 | The [`fix` option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule.
|
23 |
|
24 | ## Options
|
25 |
|
26 | `string`: `"always"`
|
27 |
|
28 | ### `"always"`
|
29 |
|
30 | There _must always_ be a newline after the semicolon.
|
31 |
|
32 | The following patterns are considered violations:
|
33 |
|
34 |
|
35 | ```css
|
36 | @import url("x.css"); @import url("y.css");
|
37 | ```
|
38 |
|
39 |
|
40 | ```css
|
41 | @import url("x.css"); a {}
|
42 | ```
|
43 |
|
44 | The following patterns are _not_ considered violations:
|
45 |
|
46 |
|
47 | ```css
|
48 | @import url("x.css");
|
49 | @import url("y.css");
|
50 | ```
|
51 |
|
52 |
|
53 | ```css
|
54 | @import url("x.css"); /* end-of-line comment */
|
55 | a {}
|
56 | ```
|
57 |
|
58 |
|
59 | ```css
|
60 | @import url("x.css");
|
61 |
|
62 | a {}
|
63 | ```
|