Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

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

coderaiser44.9kMIT3.0.1

🐊Putout plugin adds ability to find and remove unused for-of variables

putout, putout-plugin, putout-plugin-remove, plugin, remove, unused, for-of-variables

readme

@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