diff --git a/.changeset/silly-eagles-grow.md b/.changeset/silly-eagles-grow.md new file mode 100644 index 0000000000..89cbe18d03 --- /dev/null +++ b/.changeset/silly-eagles-grow.md @@ -0,0 +1,5 @@ +--- +"stylelint": patch +--- + +Fixed: `selector-id-pattern` performance diff --git a/lib/rules/selector-id-pattern/index.js b/lib/rules/selector-id-pattern/index.js index e22c6ef74d..c89280a786 100644 --- a/lib/rules/selector-id-pattern/index.js +++ b/lib/rules/selector-id-pattern/index.js @@ -31,7 +31,7 @@ const rule = (primary) => { const normalizedPattern = isString(primary) ? new RegExp(primary) : primary; - root.walkRules((ruleNode) => { + root.walkRules(/#/, (ruleNode) => { if (!isStandardSyntaxRule(ruleNode)) { return; }