From 4c3e693253013a447ecc9d6cb7815b99cda19cf6 Mon Sep 17 00:00:00 2001 From: JoelCDL Date: Thu, 23 Feb 2023 16:52:03 -0800 Subject: [PATCH] Add stylelint bem class pattern, remove nesting depth options Regex bem pattern copied from https://regexr.com/5m0g9 referenced from https://github.com/WordPress/gutenberg/issues/28616 --- package.json | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index cf5de04..ac50e17 100644 --- a/package.json +++ b/package.json @@ -70,13 +70,11 @@ "stylelint-config-property-sort-order-smacss" ], "rules": { - "max-nesting-depth": [ - 2, + "max-nesting-depth": 2, + "selector-class-pattern": [ + "^([a-z][a-z0-9]*)(-[a-z0-9]+)*((__([a-z][a-z0-9]*)(-[a-z0-9]+)*)?(--([a-z][a-z0-9]*)(-[a-z0-9]+)*)?)$", { - "ignore": [ - "blockless-at-rules", - "pseudo-classes" - ] + "message": "Expected class pattern to be BEM style" } ], "import-notation": null,