# babel-plugin-undeclared-variables-check

> Throw a compile-time error on references to undeclared variables

Latest version **6.22.0** (published 2017-01-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install babel-plugin-undeclared-variables-check
pnpm add babel-plugin-undeclared-variables-check
yarn add babel-plugin-undeclared-variables-check
bun add babel-plugin-undeclared-variables-check
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: no vulnerabilities; high maintenance score; popular repo.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 6.22.0 |
| Published | 2017-01-20 |
| First published | 2015-06-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 44064 |
| Maintainers | amasad, hzoo, jmm, loganfsmyth, sebmck, thejameskyle |
| Keywords | babel-plugin |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-undeclared-variables-check
- Repository: https://github.com/babel/babel/tree/master/packages/babel-plugin-undeclared-variables-check
- npm.io page: https://npm.io/package/babel-plugin-undeclared-variables-check

## Dependencies (2)

- [leven](https://npm.io/package/leven.md) ^1.0.2
- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.22.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 6.22.0 (latest) — 2017-01-20
- 6.8.0 — 2016-05-02
- 6.7.2 — 2016-03-10
- 6.5.0-1 — 2016-02-07
- 6.5.0 — 2016-02-07
- 6.3.13 — 2015-12-04
- 6.2.4 — 2015-11-25
- 6.1.18 — 2015-11-12
- 6.1.17 — 2015-11-12
- 6.1.4 — 2015-11-11
- 6.0.14 — 2015-10-30
- 6.0.2 — 2015-10-29
- 1.0.2 — 2015-06-15
- 1.0.1 — 2015-06-15

## README

# babel-plugin-undeclared-variables-check

> This plugin throws a compile-time error on references to undeclared variables.

## Example

**In**

```javascript
function foo() {}
foo();
bar();
```

**Out**

```
ReferenceError: stdin: Line 3: Reference to undeclared variable "bar" - did you mean "foo"?
  1 | function foo() {}
  2 | foo();
> 3 | bar();
    | ^
  4 |
```

## Installation

```sh
npm install --save-dev babel-plugin-undeclared-variables-check
```

## Usage

### Via `.babelrc` (Recommended)

**.babelrc**

```json
{
  "plugins": ["undeclared-variables-check"]
}
```

### Via CLI

```sh
babel --plugins undeclared-variables-check script.js
```

### Via Node API

```javascript
require("babel-core").transform("code", {
  plugins: ["undeclared-variables-check"]
});
```

---
_Source: https://npm.io/package/babel-plugin-undeclared-variables-check · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
