From e7d6f97903b40612e50779174a732b890825bc9e Mon Sep 17 00:00:00 2001 From: Antonio Laguna Date: Wed, 2 Aug 2023 13:22:55 +0200 Subject: [PATCH] Porting from #314 --- packages/stylelint-config/index.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/stylelint-config/index.js b/packages/stylelint-config/index.js index a76b98e5..ae164d27 100644 --- a/packages/stylelint-config/index.js +++ b/packages/stylelint-config/index.js @@ -23,6 +23,12 @@ module.exports = { ignore: ['stylelint-commands'], }, ], + 'custom-property-pattern': [ + '^([a-z][a-z0-9]*)(-[a-z0-9]+)*$|^wp--([a-z][a-z0-9]*)(--[a-z0-9]+)*$', + { + message: 'Expected custom property name to be kebab-case or wp--kebab--case', + }, + ], 'declaration-block-no-duplicate-properties': [ true, { @@ -59,14 +65,7 @@ module.exports = { 'scale-unlimited/declaration-strict-value': [ '/color/', { - ignoreValues: [ - 'currentColor', - 'currentcolor', - 'inherit', - 'initial', - 'transparent', - 'unset', - ], + ignoreValues: ['currentcolor', 'inherit', 'initial', 'transparent', 'unset'], }, ], 'selector-attribute-quotes': 'always',