This plugin includes two ESLint environments:
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.
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
}
}MIT © Andrew Abramov