3.0.1 β€’ Published 1 year ago

@putout/plugin-remove-unused-for-of-variables v3.0.1

Weekly downloads
2,090
License
MIT
Repository
github
Last release
1 year ago

@putout/plugin-remove-unused-for-of-variables NPM version

🐊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