bem-validator-loader
This is a validator to check that your css complains with BEM naming convention
Installing
Using npm:
$ npm install --save-dev bem-validator-loader
Using yarn
$ yarn add -D bem-validator-loader
Example webpack.config.js
moduleexports = module: rules: test: /\.css$/ use: 'style-loader' 'css-loader' 'bem-validator-loader'
Options
include
(exclude
) List of regular expressions of filepaths to validate (skip)
loader: "bem-validator-loader" options: exclude: "/node_modules"
webpackDirectories
Callback to calculate list of directories for bem module checking
loader: "bem-validator-loader" options: include: /webpack\/pages/ /webpack\/common/ { const dirs = fullpath const i = dirs return dirs }
onError
Callback to catch errors. For example to replace all errors with warnings
loader: "bem-validator-loader" options: { if optionsfilename optionsthis else throw error }
BEM (Block Element Modifier) Validator webpack loader
This is a fork of @torleif’s BEM (Block Element Modifier) Validation Service
which is forked from
This is a fork of @iamdustan’s iamdustan’s AST explorer
which is forked from
This is a fork of @fkling’s Esprima AST Explorer