eslint-plugin-only-var

0.1.2 • Public • Published

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"] }]
  }
}

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i eslint-plugin-only-var

    Weekly Downloads

    656

    Version

    0.1.2

    License

    MIT

    Last publish

    Collaborators

    • deecewan