eslint-plugin-bem-xjst
v2.4.0
Published
ESLint environments for bem-xjst
Downloads
21
Readme
ESLint environments for bem-xjst
This plugin includes two ESLint environments:
Install
You'll first need to install ESLint
:
$ npm install eslint --save-dev
Note: You may install ESLint globally using the -g
flag.
Next, install eslint-plugin-bem-xjst
:
$ npm install eslint-plugin-bem-xjst --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-bem-xjst
globally.
A globally-installed instance of ESLint can only use globally-installed ESLint plugins. A locally-installed ESLint can make use of both locally- and globally- installed ESLint plugins.
Usage
Add bem-xjst
to the plugins section of your .eslintrc
configuration file.
{
"plugins": [
"bem-xjst"
]
}
Note: We omitted the eslint-plugin-
prefix since it is automatically assumed by ESLint.
For BEMHTML templates add the bem-xjst/bemhtml
environment to .eslintrc
:
{
"env": {
"bem-xjst/bemhtml": true
}
}
For BEMTREE templates add the bem-xjst/bemtree
environment to .eslintrc
:
{
"env": {
"bem-xjst/bemtree": true
}
}
License
MIT © Andrew Abramov