@putout/plugin-convert-label-to-object
A labeled statement is any
statement
that is prefixed with anidentifier
. You can jump to this label using abreak
orcontinue
statement nested within the labeled statement. (c) MDN
🐊Putout plugin adds ability to find and convert label
to object
.
Checkout in 🐊Putout Editor.
Install
npm i @putout/plugin-convert-label-to-object
Rule
{
"rules": {
"convert-label-to-object": "on"
}
}
❌ Example of incorrect code
const a = () => ({
hello: 'world',
x: 'm',
});
✅ Example of correct code
const a = () => ({
hello: 'world',
x: 'm',
});
License
MIT