2.0.0 β€’ Published 1 year ago

@putout/plugin-remove-useless-continue v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@putout/plugin-remove-useless-continue NPM version

The continue statement terminates execution of the statements in the current iteration of loop.

(c) MDN

🐊Putout plugin adds ability to remove useless continue.

Install

npm i @putout/plugin-remove-useless-continue

Rule

{
    "rules": {
        "remove-useless-continue": "on"
    }
}

❌ Example of incorrect code

for (sign = decpt, i = 0; sign /= 10 !== 0; i++) {
    console.log('hello');
    continue;
}

βœ… Example of correct code

for (sign = decpt, i = 0; sign /= 10 !== 0; i++) {
    console.log('hello');
}

License

MIT