UNPKG

1.13 kBMarkdownView Raw
1# at-rule-semicolon-newline-after
2
3Require a newline after the semicolon of at-rules.
4
5<!-- prettier-ignore -->
6```css
7@import url("x.css");
8@import url("y.css");
9/** ↑
10 * The newline after these semicolons */
11```
12
13This rule allows an end-of-line comment followed by a newline. For example:
14
15<!-- prettier-ignore -->
16```css
17@import url("x.css"); /* end-of-line comment */
18
19a {}
20```
21
22The [`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
30There _must always_ be a newline after the semicolon.
31
32The following patterns are considered violations:
33
34<!-- prettier-ignore -->
35```css
36@import url("x.css"); @import url("y.css");
37```
38
39<!-- prettier-ignore -->
40```css
41@import url("x.css"); a {}
42```
43
44The following patterns are _not_ considered violations:
45
46<!-- prettier-ignore -->
47```css
48@import url("x.css");
49@import url("y.css");
50```
51
52<!-- prettier-ignore -->
53```css
54@import url("x.css"); /* end-of-line comment */
55a {}
56```
57
58<!-- prettier-ignore -->
59```css
60@import url("x.css");
61
62a {}
63```