1.0.2 β’ Published 6 months ago
@putout/plugin-remove-useless-break v1.0.2
@putout/plugin-remove-useless-break
The
break
statement terminates the current loop or switch statement and transfers program control to the statement following the terminated statement.(c) MDN
πPutout plugin adds ability to remove useless break
. Checkout in πPutout Editor.
Install
npm i @putout/plugin-remove-useless-break
Rule
{
"rules": {
"remove-useless-break": "on"
}
}
β Example of incorrect code
while (a) {
break;
}
β Example of correct code
while (a) {}
License
MIT