2.7.0 • Published 11 months ago

eslint-plugin-no-one-time-vars v2.7.0

Weekly downloads
-
License
MPL-2.0
Repository
github
Last release
11 months ago

eslint-plugin-no-one-time-vars

Disallows one-time variables

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-no-one-time-vars:

npm install eslint-plugin-no-one-time-vars --save-dev

Usage

Add no-one-time-vars to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["no-one-time-vars"]
}

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

{
  "rules": {
    "no-one-time-vars/no-one-time-vars": "error"
  }
}

To add an option to the rule configuration do the following:

{
  "rules": {
    "no-one-time-vars/no-one-time-vars": [
      "error",
      {
        "option-name": "option-value"
      }
    ]
  }
}

Supported Rules

  • no-one-time-vars

Supported Options

  • ignoredVariables
    • type: Array of strings
    • default: []
  • allowInsideCallback
    • type: Boolean
    • default: true
  • ignoreFunctionVariables
    • type: Boolean
    • default: true
  • ignoreArrayVariables
    • type: Boolean, Number
    • default: false
  • ignoreObjectVariables
    • type: Boolean
    • default: false
  • ignoreObjectDestructuring:
    • type: Boolean
    • default: false
  • ignoreExportedVariables:
    • type: Boolean
    • default: true
  • ignoreTemplateLiterals:
    • type: Boolean
    • default: false
2.7.0

11 months ago

2.6.1

12 months ago

2.6.0

12 months ago

2.5.0

2 years ago

2.4.2

3 years ago

2.3.0

3 years ago

2.2.1

3 years ago

2.4.1

3 years ago

2.2.3

3 years ago

2.4.0

3 years ago

2.2.2

3 years ago

2.2.5

3 years ago

2.2.4

3 years ago

2.2.6

3 years ago

2.1.2

3 years ago

2.0.3

4 years ago

2.2.0

3 years ago

2.1.1

4 years ago

2.0.2

4 years ago

2.0.5

4 years ago

2.0.4

4 years ago

2.1.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago