2.0.1 β’ Published 1 year ago
@putout/plugin-remove-useless-for-of v2.0.1
@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