@putout/plugin-remove-unused-for-of-variables 
🐊Putout plugin adds ability to find and remove unused
for-of
variables
. Merged to @putout/plugin-for-of
.
Install
npm i @putout/plugin-remove-unused-for-of-variables -D
Rule
{
"rules": {
"remove-unused-for-of-variables": "on"
}
}
❌ Example of incorrect code
for (const {a, b} of c) {
console.log(a);
}
✅ Example of correct code
for (const {a} of c) {
console.log(a);
}
License
MIT