sass - How to lint for a harry robert's BEM convention with stylelint? -


postcss bem linter plugin needs component definition each block time consuming thing in legacy project.

is there way use stylelint check classes pattern , show error in stylesheets (.scss in case) of project without needing component definition in each file/block?

https://csswizardry.com/2013/01/mindbemding-getting-your-head-round-bem-syntax/

.block {} .block__element {} .block--modifier {} 

you can use stylelint's selector-class-pattern rule enforce pattern class selectors using regular expression.

however, if you're writing bem-like css stylelint-selector-bem-pattern, wraps postcss bem linter, more powerful understands concept of components, elements, modifiers , utility classes.

there an option implicitly define components based on filename, removing need component definitions within each file.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -