$ npm install @putout/plugin-labels
A labeled statement is any
statementthat is prefixed with anidentifier. You can jump to this label using abreakorcontinuestatement nested within the labeled statement. (c) MDN
πPutout plugin adds ability to find and remove unused label statement.
npm i @putout/plugin-labels -D
{
"rules": {
"labels/convert-to-object": "on",
"labels/remove-unused": "on"
}
}
βοΈ If you want to override any of it, update .putout.json in the directory near your files.
π¦ Configuration section of πPutout documentation tell you more about all configuration options supported.
Checkout in πPutout Editor.
const a = () => {
hello: 'world';
x: 'm';
};
const a = () => ({
hello: 'world',
x: 'm',
});
Checkout in πPutout Editor.
hello: while (true) {
break;
}
while (true) {
break;
}
| Linter | Rule | Fix |
|---|---|---|
| π Putout | remove-unused-labels |
β |
| β£ ESLint | no-unused-labels |
β |
| π¦ Deno | no-unused-labels |
β |
MIT
© 2010 - cnpmjs.org x YWFE | Home | YWFE