@bem-react/eslint-plugin

1.1.2 • Public • Published

@bem-react/eslint-plugin · npm (scoped)

Plugin for checking some things in projects based on BEM React.

Usage

Add @bem-react to the plugins section of your .eslintrc configuration file:

{
  "plugins": ["@bem-react"]
}

Then configure the rules you want to use under the rules section.

{
  "rules": {
    "@bem-react/no-classname-runtime": "warn",
    "@bem-react/whitelist-levels-imports": [
      "error",
      {
        "defaultLevel": "common",
        "whiteList": {
          "common": ["common"],
          "desktop": ["common", "desktop"],
          "mobile": ["common", "mobile"]
        }
      }
    ]
  }
}

Supported Rules

Currently is supported:

Package Sidebar

Install

npm i @bem-react/eslint-plugin

Weekly Downloads

77

Version

1.1.2

License

MPL-2.0

Unpacked Size

33.8 kB

Total Files

11

Last publish

Collaborators

  • veged
  • awinogradov
  • yarastqt
  • tadatuta
  • yeti-or
  • kilyaa
  • sergcen