mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-20 08:52:59 +00:00
76 lines
834 B
Markdown
76 lines
834 B
Markdown
# block-no-empty
|
|
|
|
Disallow empty blocks.
|
|
|
|
<!-- prettier-ignore -->
|
|
```css
|
|
a { }
|
|
/** ↑
|
|
* Blocks like this */
|
|
```
|
|
|
|
## Options
|
|
|
|
### `true`
|
|
|
|
The following patterns are considered problems:
|
|
|
|
<!-- prettier-ignore -->
|
|
```css
|
|
a {}
|
|
```
|
|
|
|
<!-- prettier-ignore -->
|
|
```css
|
|
a { }
|
|
```
|
|
|
|
<!-- prettier-ignore -->
|
|
```css
|
|
@media print {
|
|
a {}
|
|
}
|
|
```
|
|
|
|
The following patterns are _not_ considered problems:
|
|
|
|
<!-- prettier-ignore -->
|
|
```css
|
|
a {
|
|
/* foo */
|
|
}
|
|
```
|
|
|
|
<!-- prettier-ignore -->
|
|
```css
|
|
@media print {
|
|
a {
|
|
color: pink;
|
|
}
|
|
}
|
|
```
|
|
|
|
## Optional secondary options
|
|
|
|
### `ignore: ["comments"]`
|
|
|
|
Exclude comments from being treated as content inside of a block.
|
|
|
|
The following patterns are considered problems:
|
|
|
|
<!-- prettier-ignore -->
|
|
```css
|
|
a {
|
|
/* foo */
|
|
}
|
|
```
|
|
|
|
<!-- prettier-ignore -->
|
|
```css
|
|
@media print {
|
|
a {
|
|
/* foo */
|
|
}
|
|
}
|
|
```
|