🐊Putout plugin adds ability to find and remove useless return
npm install @putout/plugin-remove-useless-return[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-remove-useless-return.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-remove-useless-return"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 remove useless return. Merged with @putout/plugin-return.
```
npm i @putout/plugin-remove-useless-return
`json`
{
"rules": {
"remove-useless-return": "on"
}
}
`js`
const traverse = ({push}) => {
return {
ObjectExpression(path) {
push(path);
},
};
};
`js``
const traverse = ({push}) => ({
ObjectExpression(path) {
push(path);
},
});
MIT