@putout/plugin-remove-useless-continue

2.0.0 • Public • Published

@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

Package Sidebar

Install

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

Weekly Downloads

14,863

Version

2.0.0

License

MIT

Unpacked Size

4.15 kB

Total Files

4

Last publish

Collaborators

  • coderaiser