@putout/plugin-merge-return-with-next-sibling
v1.0.1
Published
šPutout plugin adds ability to merge return with next sibling
Readme
@putout/plugin-merge-return-with-next-sibling 
The
returnstatement 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.
Install
npm i @putout/plugin-merge-return-with-next-siblingRule
{
"rules": {
"merge-return-with-next-sibling": "on"
}
}ā Example of incorrect code
function x() {
return;
{
hello: 'world';
}
return;
5;
return;
a ? 2 : 3;
}ā Example of correct code
function x() {
return {
hello: 'world',
};
return 5;
return a ? 2 : 3;
}License
MIT
