@putout/plugin-remove-useless-for-of
v2.0.1
Published
šPutout plugin adds ability to remove useless for-of
Downloads
48,339
Maintainers
Readme
@putout/plugin-remove-useless-for-of
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