Skip to content

Commit

Permalink
Fix selector-anb-no-unmatchable performance
Browse files Browse the repository at this point in the history
  • Loading branch information
romainmenke committed Jul 4, 2023
1 parent 16110fd commit d615d66
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/rules/selector-anb-no-unmatchable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,11 @@ const rule = (primary) => {
}

root.walkRules((ruleNode) => {
if (!isStandardSyntaxRule(ruleNode)) {
return;
}
if (!hasANPlusBNotationPseudoClasses(ruleNode.selector)) return;

ruleNode.selectors.forEach((selector) => {
if (!hasANPlusBNotationPseudoClasses(selector)) return;
if (!isStandardSyntaxRule(ruleNode)) return;

ruleNode.selectors.forEach((selector) => {
let cssTreeSelector;

try {
Expand Down

0 comments on commit d615d66

Please sign in to comment.