-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no-empty-rulesets does not catch rulesets containing only comments #968
Comments
RIghtly or wrongly I chose to ignore this while we didn't have the ability to disable rules via comments but now that we do I think it's perfectly reasonable to believe that this should still fail as the comments aren't being pumped out into CSS. There's an argument for Also as with all our bug issues PR's are welcome! |
I guess I'm not sure why you'd ever want to preserve an empty block, even with comments. Similar tools like CSSLint seem to agree: https://github.com/CSSLint/csslint/wiki/Disallow-empty-rules I'll submit a PR in the next few days. |
This commit makes the no-empty-rulesets rule trigger when a ruleset contains only comments. Closes sasstools#968.
This commit makes the no-empty-rulesets rule trigger when a ruleset contains only comments. Closes sasstools#968.
This commit makes the no-empty-rulesets rule trigger when a ruleset contains only comments. Closes #968.
What version of Sass Lint are you using?
1.10.2
With
no-empty-rulesets
enabled, rulesets containing only comments are not considered empty, and therefore do not trigger the rule. I would argue rulesets like the following are definitely empty:Does this seem like a reasonable assumption?
I worked up a commit that changes the behavior to fix this if there's any interest.
The text was updated successfully, but these errors were encountered: