README.md 513 Bytes

babel-plugin-undeclared-variables-check

Throw a compile-time error on references to undeclared variables

Installation

$ npm install babel-plugin-undeclared-variables-check

Usage

Via .babelrc (Recommended)

.babelrc

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

Via CLI

$ babel --plugins undeclared-variables-check script.js

Via Node API

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