Skip to content

Latest commit

 

History

History
 
 

plugin-remove-useless-continue

@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