eslint-plugin-bem-xjst

2.4.0 • Public • Published

ESLint environments for bem-xjst

NPM Status Travis Status

This plugin includes two ESLint environments:

  • bem-xjst/bemhtml - for BEMHTML templates
  • bem-xjst/bemtree - for BEMTREE templates

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

Package Sidebar

Install

npm i eslint-plugin-bem-xjst

Weekly Downloads

3

Version

2.4.0

License

MIT

Unpacked Size

5.25 kB

Total Files

4

Last publish

Collaborators

  • miripiruni
  • tadatuta
  • blond