1.0.2 β’ Published 2 years ago
@putout/plugin-remove-unused-labels v1.0.2
@putout/plugin-remove-unused-labels 
A labeled statement is any statement that is prefixed with an identifier. You can jump to this label using a
breakorcontinuestatement nested within the labeled statement.>(c) MDN
πPutout plugin adds ability to find and remove unused label statement. Merged to @putout/plugin-labels.
Checkout in πPutout Editor.
Install
npm i @putout/plugin-remove-unused-labelsRule
{
"rules": {
"remove-unused-labels": "on"
}
}β Example of incorrect code
hello: while (true) {
break;
}β Example of correct code
while (true) {
break;
}Comparison
| Linter | Rule | Fix |
|---|---|---|
| π Putout | remove-unused-labels | β |
| β£ ESLint | no-unused-labels | β |
| π¦ Deno | no-unused-labels | β |
License
MIT