block-no-empty
Disallow empty blocks.
a { }/** ↑ * Blocks like this */Use this rule to avoid leftovers from edits, such as empty style rules.
This rule doesn’t have any message arguments.
Options
Section titled “Options”{ "block-no-empty": true}The following patterns are considered problems:
a {}a { }@media print { a {}}The following patterns are not considered problems:
a { /* foo */}@media print { a { color: pink; }}Optional secondary options
Section titled “Optional secondary options”ignore
Section titled “ignore”{ "ignore": ["array", "of", "options"] }"comments"
Section titled “"comments"”Exclude comments from being treated as content inside of a block.
{ "block-no-empty": [true, { "ignore": ["comments"] }]}The following patterns are considered problems:
a { /* foo */}@media print { a { /* foo */ }}