🐊Putout plugin adds ability to merge return with next sibling
npm install @putout/plugin-merge-return-with-next-sibling[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-merge-return-with-next-sibling.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-merge-return-with-next-sibling "npm"
> The return statement ends function execution and specifies a value to be returned to the function caller.
>
> (c) MDN
🐊Putout plugin adds ability to find and merge return with next sibling. Checkout in 🐊Putout Editor. Merged with @putout/plugin-return.
```
npm i @putout/plugin-merge-return-with-next-sibling
`json`
{
"rules": {
"merge-return-with-next-sibling": "on"
}
}
`js`
function x() {
return;
{
hello: 'world';
}
return;
5;
return;
a ? 2 : 3;
}
`js``
function x() {
return {
hello: 'world',
};
return 5;
return a ? 2 : 3;
}
MIT