Skip to content

Commit

Permalink
Remove qualified-headings rule
Browse files Browse the repository at this point in the history
  • Loading branch information
bogger33 authored Mar 2, 2021
1 parent 760ce70 commit 107e3e0
Showing 1 changed file with 0 additions and 39 deletions.
39 changes: 0 additions & 39 deletions lib/ace/mode/css/csslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -8263,45 +8263,6 @@ CSSLint.addRule({

});

/*
* Rule: Headings (h1-h6) should not be qualified (namespaced).
*/

CSSLint.addRule({

//rule information
id: "qualified-headings",
name: "Disallow qualified headings",
desc: "Headings should not be qualified (namespaced).",
browsers: "All",

//initialization
init: function(parser, reporter){
var rule = this;

parser.addListener("startrule", function(event){
var selectors = event.selectors,
selector,
part,
i, j;

for (i=0; i < selectors.length; i++){
selector = selectors[i];

for (j=0; j < selector.parts.length; j++){
part = selector.parts[j];
if (part.type === parser.SELECTOR_PART_TYPE){
if (part.elementName && /h[1-6]/.test(part.elementName.toString()) && j > 0){
reporter.report("Heading (" + part.elementName + ") should not be qualified.", part.line, part.col, rule);
}
}
}
}
});
}

});

/*
* Rule: Selectors that look like regular expressions are slow and should be avoided.
*/
Expand Down

0 comments on commit 107e3e0

Please sign in to comment.