Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e1f8a6e

Browse files
authored
Fix container-name-pattern mutation of shared reference set (#8514)
1 parent e1d158d commit e1f8a6e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/rules/container-name-pattern/index.cjs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/rules/container-name-pattern/index.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const rule = (primary) => {
3838
const languageCssWideKeywords =
3939
result.stylelint.config?.languageOptions?.syntax?.cssWideKeywords ?? [];
4040

41-
languageCssWideKeywords.forEach(basicKeywords.add, basicKeywords);
41+
const cssWideKeywords = new Set([...basicKeywords, ...languageCssWideKeywords]);
4242

4343
root.walkDecls(propertyRegexes.containerNameAndShorthandName, (decl) => {
4444
if (!isStandardSyntaxDeclaration(decl)) return;
@@ -54,7 +54,7 @@ const rule = (primary) => {
5454

5555
if (type !== 'word') return false;
5656

57-
if (basicKeywords.has(value.toLowerCase())) return;
57+
if (cssWideKeywords.has(value.toLowerCase())) return;
5858

5959
if (!isStandardSyntaxValue(value)) return;
6060

0 commit comments

Comments
 (0)