Skip to content

Commit

Permalink
fix: fix selector-class-pattern does not match BEM notation
Browse files Browse the repository at this point in the history
  • Loading branch information
hsnaydd committed Oct 30, 2023
1 parent d2bf0d9 commit 765704d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions index.js
Expand Up @@ -170,6 +170,15 @@ module.exports = {
'scss/operator-no-unspaced': true,
'scss/selector-no-redundant-nesting-selector': true,
'selector-attribute-quotes': 'always',
'selector-class-pattern': [
'^[a-z]([-]?[a-z0-9]+)*(__[a-z0-9]([-]?[a-z0-9]+)*)?(--[a-z0-9]([-]?[a-z0-9]+)*)?$',
{
resolveNestedSelectors: true,
message: function expected(selectorValue) {
return `Expected class selector "${selectorValue}" to match BEM CSS pattern https://en.bem.info/methodology/css.`;
},
},
],
'selector-max-attribute': 2,
'selector-max-class': 3,
'selector-max-compound-selectors': 3,
Expand Down

0 comments on commit 765704d

Please sign in to comment.