@putout/plugin-remove-useless-for-of

2.0.1 • Public • Published

@putout/plugin-remove-useless-for-of NPM version

The Array enables storing a collection of multiple items under a single variable name.

(c) MDN

🐊Putout plugin adds ability to remove useless for...of statements. Merged to @putout/plugin-for-of.

Install

npm i @putout/plugin-remove-useless-for-of

Rule

{
    "rules": {
        "remove-useless-for-of": "on"
    }
}

Example of incorrect code

for (const a of ['hello']) {
    console.log(a);
}

Example of correct code

console.log('hello');

License

MIT

Package Sidebar

Install

npm i @putout/plugin-remove-useless-for-of

Weekly Downloads

10,563

Version

2.0.1

License

MIT

Unpacked Size

5.04 kB

Total Files

4

Last publish

Collaborators

  • coderaiser