Skip to content

Commit

Permalink
Add stylelint bem class pattern, remove nesting depth options
Browse files Browse the repository at this point in the history
Regex bem pattern copied from https://regexr.com/5m0g9 referenced from WordPress/gutenberg#28616
  • Loading branch information
JoelCDL committed Feb 24, 2023
1 parent 3f3b841 commit 4c3e693
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4c3e693

Please sign in to comment.