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

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

Usage no npm install needed!

<script type="module">
  import putoutPluginRemoveUnusedForOfVariables from 'https://cdn.skypack.dev/@putout/plugin-remove-unused-for-of-variables';
</script>

README

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

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

Install

npm i @putout/plugin-remove-unused-for-of-variables -D

Rule

{
    "rules": {
        "remove-unused-for-of-variables": "on"
    }
}

❌ Incorrect code example

for (const {a, b} of c) {
    console.log(a);
}

✅ Correct code Example

for (const {a} of c) {
    console.log(a);
}

License

MIT