@putout/plugin-remove-unreferenced-variables
v4.0.0
Published
šPutout plugin adds ability to find and remove unreferenced variables
Downloads
54,902
Maintainers
Readme
@putout/plugin-remove-unreferenced-variables
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