.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / rules / declaration-block-semicolon-newline-after / README.md
1 # declaration-block-semicolon-newline-after
2
3 Require a newline or disallow whitespace after the semicolons of declaration blocks.
4
5 ```css
6 a {
7   color: pink;
8   top: 0;    ↑
9 }            ↑
10 /**          ↑
11  * The newline after this semicolon */
12 ```
13
14 This rule ignores semicolons that are preceded by Less mixins.
15
16 This rule ignores the last semicolon of declaration blocks. Use the `block-closing-brace-*-before` rules to control the whitespace between the last semicolon and the closing brace instead.
17
18 This rule allows an end-of-line comment followed by a newline. For example,
19
20 ```css
21 a {
22   color: pink; /* end-of-line comment */
23   top: 0;
24 }
25 ```
26
27 ## Options
28
29 `string`: `"always"|"always-multi-line"|"never-multi-line"`
30
31 ### `"always"`
32
33 There *must always* be a newline after the semicolon.
34
35 The following patterns are considered violations:
36
37 ```css
38 a { color: pink; top: 0; }
39 ```
40
41 ```css
42 a {
43   color: pink; /* end-of-line comment
44     containing a newline */
45   top: 0;
46 }
47 ```
48
49 The following patterns are *not* considered violations:
50
51 ```css
52 a {
53   color: pink;
54   top: 0;
55 }
56 ```
57
58 ```css
59 a {
60   color: pink; /* end-of-line comment */
61   top: 0;
62 }
63 ```
64
65 ### `"always-multi-line"`
66
67 There *must always* be a newline after the semicolon in multi-line rules.
68
69 The following patterns are considered violations:
70
71 ```css
72 a {
73   color: pink; top: 0;
74 }
75 ```
76
77 The following patterns are *not* considered violations:
78
79 ```css
80 a { color: pink; }
81 ```
82
83 ```css
84 a { color: pink; top: 0; }
85 ```
86
87 ```css
88 a {
89   color: pink;
90   top: 0;
91 }
92 ```
93
94 ### `"never-multi-line"`
95
96 There *must never* be whitespace after the semicolon in multi-line rules.
97
98 The following patterns are considered violations:
99
100 ```css
101 a {
102   color: pink;
103   top: 0;
104 }
105 ```
106
107 The following patterns are *not* considered violations:
108
109 ```css
110 a { color: pink; }
111 ```
112
113 ```css
114 a { color: pink; top: 0; }
115 ```
116
117 ```css
118 a {
119   color: pink
120   ; top: 0;
121 }
122 ```