$ cnpm 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
Copyright 2013 - present © cnpmjs.org | Home |