What rule do you want to change?
no-empty-blocks
What change do you want to make?
Generate fewer warnings
How do you think the change should be implemented?
A new option
Example code
@media (min-width: 1200px) {
.sidebar { /* Fix this later */ }
}
What does the rule currently do for this code?
The rule reports the block as empty.
The rule currently treats comments as not being content, so a block containing only a comment is reported. There is no option to change this behavior.
What will the rule do after it's changed?
With a new option, users could choose for comment-only blocks to be treated as non-empty, so the example above would not be reported.
Participation
AI acknowledgment
Additional comments
This would bring no-empty-blocks closer to Stylelint’s block-no-empty, which does not report comment-only blocks by default: https://stylelint.io/user-guide/rules/block-no-empty/
What rule do you want to change?
no-empty-blocks
What change do you want to make?
Generate fewer warnings
How do you think the change should be implemented?
A new option
Example code
What does the rule currently do for this code?
The rule reports the block as empty.
The rule currently treats comments as not being content, so a block containing only a comment is reported. There is no option to change this behavior.
What will the rule do after it's changed?
With a new option, users could choose for comment-only blocks to be treated as non-empty, so the example above would not be reported.
Participation
AI acknowledgment
Additional comments
This would bring
no-empty-blockscloser to Stylelint’sblock-no-empty, which does not report comment-only blocks by default: https://stylelint.io/user-guide/rules/block-no-empty/