Skip to content

Commit 115762a

Browse files
author
Frank van Gemeren
committed
Fix test for unique headings to not cause the empty-rule error
1 parent d45d16e commit 115762a

2 files changed

Lines changed: 1 addition & 7 deletions

File tree

src/rules/empty-rules.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@ CSSLint.addRule({
2828
parser.addListener("endrule", function(event) {
2929
var selectors = event.selectors;
3030

31-
// If we ignore lines, we end up without rules.
32-
// this prevents the triggering of the empty rule. The question is if this is wanted behavior.
33-
if (reporter.ignore.length) {
34-
return;
35-
}
36-
3731
if (count === 0) {
3832
reporter.report("Rule is empty.", selectors[0].line, selectors[0].col, rule);
3933
}

tests/rules/unique-headings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
},
4343

4444
"Ignore should remove rollup warning messages for unique headings": function() {
45-
var report = CSSLint.verify("/* csslint ignore:start */\nh1 {}\nh1 {}/* csslint ignore:end */h2 {color: #fff}\n");
45+
var report = CSSLint.verify("/* csslint ignore:start */\nh1 {color: #f0f}\nh1 {color: #ff0}/* csslint ignore:end */h2 {color: #fff}\n");
4646
Assert.areEqual(0, report.messages.length);
4747
}
4848

0 commit comments

Comments
 (0)