eslint-plugin-only-var
v0.1.2
Published
> Enforce `var` usage.
Downloads
1,031
Readme
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"] }]
}
}