UNPKG

840 BMarkdownView Raw
1# block-no-empty
2
3Disallow empty blocks.
4
5<!-- prettier-ignore -->
6```css
7 a { }
8/** ↑
9 * Blocks like this */
10```
11
12## Options
13
14### `true`
15
16The following patterns are considered violations:
17
18<!-- prettier-ignore -->
19```css
20a {}
21```
22
23<!-- prettier-ignore -->
24```css
25a { }
26```
27
28<!-- prettier-ignore -->
29```css
30@media print {
31 a {}
32}
33```
34
35The following patterns are _not_ considered violations:
36
37<!-- prettier-ignore -->
38```css
39a {
40 /* foo */
41}
42```
43
44<!-- prettier-ignore -->
45```css
46@media print {
47 a {
48 color: pink;
49 }
50}
51```
52
53## Optional secondary options
54
55### `ignore: ["comments"]`
56
57Exclude comments from being treated as content inside of a block.
58
59The following patterns are considered violations:
60
61<!-- prettier-ignore -->
62```css
63a {
64 /* foo */
65}
66```
67
68<!-- prettier-ignore -->
69```css
70@media print {
71 a {
72 /* foo */
73 }
74}
75```