.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / rules / block-opening-brace-newline-after / README.md
1 # block-opening-brace-newline-after
2
3 Require a newline after the opening brace of blocks.
4
5 ```css
6   a {
7     ↑ color: pink; }
8 /** ↑
9  * The newline after this brace */
10 ```
11
12 This rule allows an end-of-line comment followed by a newline. For example,
13
14 ```css
15 a { /* end-of-line comment */
16   color: pink;
17 }
18 ```
19
20 Refer to [the FAQ](../../../docs/user-guide/faq.md#how-do-i-disallow-single-line-blocks) for more information on using this rule with [`block-opening-brace-newline-before`](../block-opening-brace-newline-before/README.md) to disallow single-line rules.
21
22 ## Options
23
24 `string`: `"always"|"always-multi-line"|"never-multi-line"`
25
26 ### `"always"`
27
28 There *must always* be a newline after the opening brace.
29
30 The following patterns are considered violations:
31
32 ```css
33 a{ color: pink; }
34 ```
35
36 ```css
37 a{ color: pink;
38 }
39 ```
40
41 ```css
42 a{ /* end-of-line comment
43   with a newline */
44   color: pink;
45 }
46 ```
47
48 The following patterns are *not* considered violations:
49
50 ```css
51 a {
52 color: pink; }
53 ```
54
55 ```css
56 a
57 {
58 color: pink; }
59 ```
60
61 ```css
62 a { /* end-of-line comment */
63   color: pink;
64 }
65 ```
66
67 ### `"always-multi-line"`
68
69 There *must always* be a newline after the opening brace in multi-line blocks.
70
71 The following patterns are considered violations:
72
73 ```css
74 a{color: pink;
75 }
76 ```
77
78 The following patterns are *not* considered violations:
79
80 ```css
81 a { color: pink; }
82 ```
83
84 ```css
85 a {
86 color: pink; }
87 ```
88
89 ### `"never-multi-line"`
90
91 There *must never* be whitespace after the opening brace in multi-line blocks.
92
93 The following patterns are considered violations:
94
95 ```css
96 a { color: pink;
97 }
98 ```
99
100 The following patterns are *not* considered violations:
101
102 ```css
103 a { color: pink; }
104 ```
105
106 ```css
107 a {color: pink;
108 }
109 ```