bemhint-css-naming
Plugin for bemhint which validate css classes.
- Checks css classes for BEM-notation;
- Checks for existing target block in the selector.
Example for my-block.css
(exclude: test-*
)
/* ok */ /* will be ignored because of exclude matching */ /* not ok */ /* invalid block name */ /* there is no target block in selector */ /* there is no target block */
How to install
$ npm install bemhint-css-naming
How to use
Add plugin to .bemhint.js
:
moduleexports = plugins: 'bemhint-css-naming': true ;
Exclude some classnames from BEM-naming validation:
moduleexports = plugins: 'bemhint-css-naming': excludeClasses: 'my-another-block' 'test-*' ;