bemlinter
v2.0.0-beta.8
Published
A cli tool to lint bem component isolation in CSS / SCSS files
Downloads
356
Readme
bemlinter
A cli tool to lint bem component isolation in CSS / SCSS files.
The main rules are:
A CSS block file should only contain its own classes
A CSS file, even if it is not a block, should not style a class of another block
Quick start
npm i bemlinter --save
You can set your package.json
to use bemlinter:
{
"scripts": {
"lint": "bemlinter lint the/path/to/your/*.scss"
}
}
Configuration file
You will soon need more configuration, so you should use a json configuration file:
{
"scripts": {
"lint": "bemlinter lint --config bemlinter.json"
}
}
The configuration allow you to define:
- sources: the paths of your source files.
- excludePath (option): the paths of some exclude source files.
- excludeBlock (option): the names of some block that are not isolated yet.
- snapshot (option): the activation of quality tendency.
- checkLowerCase (option): the deactivation of lower case check.
- classPrefix (option): the class prefix.
- filePattern (option): the file pattern.
- modules (option): the configuration override for portions of your sources.
How to Contribute
- Star the project!
- Report a bug that you have found.
- Tweet or blog about bemlinter and let us know about it.
- Pull requests are also highly appreciated.
Author & Community
bemlinter is under MIT License. It was created & is maintained by Thomas ZILLIOX for M6Web.