@putout/plugin-remove-useless-return
🐊Putout plugin adds ability to find and remove useless return
Last updated 2 years ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @putout/plugin-remove-useless-return 
SYNC missed versions from official npm registry.

@putout/plugin-remove-useless-return NPM version

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.

Install

npm i @putout/plugin-remove-useless-return

Rule

{
    "rules": {
        "remove-useless-return": "on"
    }
}

❌ Example of incorrect code

const traverse = ({push}) => {
    return {
        ObjectExpression(path) {
            push(path);
        },
    };
};

✅ Example of correct code

const traverse = ({push}) => ({
    ObjectExpression(path) {
        push(path);
    },
});

License

MIT

Current Tags

  • 7.0.2                                ...           latest (2 years ago)

13 Versions

  • 7.0.2                                ...           2 years ago
  • 7.0.1                                ...           2 years ago
  • 7.0.0                                ...           2 years ago
  • 6.0.0                                ...           3 years ago
  • 5.0.0                                ...           4 years ago
  • 4.2.0                                ...           5 years ago
  • 4.1.0                                ...           5 years ago
  • 4.0.0                                ...           5 years ago
  • 3.1.1                                ...           5 years ago
  • 3.1.0                                ...           5 years ago
  • 3.0.0                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Total 8
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 7
Dependencies (0)
None
Dev Dependencies (6)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE