0.1.2 • Published 7 years ago

eslint-plugin-only-var v0.1.2

Weekly downloads
50
License
MIT
Repository
github
Last release
7 years ago

eslint-plugin-only-var

Enforce var usage.

Why

While we're in the process of upgrading the code base to newer versions of JS, we currently cannot use const or let. Sometimes we get confused and do it anyways. This will stop that.

Usage

yarn add -D eslint-plugin-only-var
// .eslintrc
{
  // ...
  "plugins": [
    "only-var"
  ],
  "rules": {
    "only-var/only-var": "error"
  }
}

If you want to ignore certain files, you can specify their extensions like so:

// .eslintrc
{
  // ...
  "plugins": [
    "only-var"
  ],
  "rules": {
    "only-var/only-var": ["error", { "ignore": [".jsx"] }]
  }
}