@putout/plugin-remove-unreferenced-variables

3.1.0 • Public • Published

@putout/plugin-remove-unreferenced-variables NPM version

A variable is a named reference to a value.

(c) MDN

🐊Putout plugin adds ability to find and remove variables without references.

Install

npm i @putout/plugin-remove-unreferenced-variables -D

Rule

{
    "rules": {
        "remove-unreferenced-variables": "on"
    }
}

Example of incorrect code

let a;
let b;

a = 5;
b = 6;

console.log(a);

✅ Example of correct code

let a;

a = 5;

console.log(a);

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.1.0
    3,560
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 3.1.0
    3,560
  • 3.0.0
    34
  • 2.2.0
    2,635
  • 2.0.0
    592
  • 1.2.0
    12,209
  • 1.1.0
    245
  • 1.0.0
    1

Package Sidebar

Install

npm i @putout/plugin-remove-unreferenced-variables

Weekly Downloads

15,020

Version

3.1.0

License

MIT

Unpacked Size

5.63 kB

Total Files

4

Last publish

Collaborators

  • coderaiser