$ cnpm install @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.
npm i @putout/plugin-merge-return-with-next-sibling
{
"rules": {
"merge-return-with-next-sibling": "on"
}
}
function x() {
return;
{
hello: 'world';
}
return;
5;
return;
a ? 2 : 3;
}
function x() {
return {
hello: 'world',
};
return 5;
return a ? 2 : 3;
}
MIT
Copyright 2013 - present © cnpmjs.org | Home |