# eslint-plugin-no-one-time-vars

> Disallows one-time variables

Latest version **2.7.0** (published 2024-07-28) · MPL-2.0 license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-no-one-time-vars
pnpm add eslint-plugin-no-one-time-vars
yarn add eslint-plugin-no-one-time-vars
bun add eslint-plugin-no-one-time-vars
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.7.0 |
| Published | 2024-07-28 |
| First published | 2021-11-13 |
| Weekly downloads | 0 |
| License | MPL-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 12.x \|\| 14.x \|\| >= 16 |
| Dependencies | 1 |
| Unpacked size | 30.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Bas950 |
| Maintainers | bas950, slowlife01 |
| Keywords | eslint, eslintplugin, eslint-plugin, one-time-vars, one-time, vars, variables |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-no-one-time-vars
- Repository: https://github.com/Bas950/eslint-plugin-no-one-time-vars
- Homepage: https://github.com/Bas950/eslint-plugin-no-one-time-vars#readme
- Issues: https://github.com/Bas950/eslint-plugin-no-one-time-vars/issues
- npm.io page: https://npm.io/package/eslint-plugin-no-one-time-vars

## Dependencies (1)

- [requireindex](https://npm.io/package/requireindex.md) ^1.2.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 2.7.0 (latest) — 2024-07-28
- 2.6.1 — 2024-07-08
- 2.6.0 — 2024-07-06
- 2.5.0 — 2023-08-11
- 2.4.2 — 2022-09-11
- 2.4.1 — 2022-04-20
- 2.4.0 — 2022-04-19
- 2.3.0 — 2022-04-12
- 2.2.6 — 2022-03-29
- 2.2.5 — 2022-03-29
- 2.2.4 — 2022-03-26
- 2.2.3 — 2022-03-26
- 2.2.2 — 2022-03-25
- 2.2.0 — 2022-02-09
- 2.1.2 — 2022-01-09
- … 13 more at https://npm.io/package/eslint-plugin-no-one-time-vars/versions

## README

# eslint-plugin-no-one-time-vars

Disallows one-time variables

## Installation

You'll first need to install [ESLint](https://eslint.org/):

```sh
npm i eslint --save-dev
```

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

```sh
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:

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

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

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

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

```json
{
  "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`

---
_Source: https://npm.io/package/eslint-plugin-no-one-time-vars · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
