7.0.2 β€’ Published 9 months ago

@putout/plugin-remove-useless-return v7.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@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

7.0.2

9 months ago

7.0.1

9 months ago

7.0.0

1 year ago

6.0.0

2 years ago

5.0.0

2 years ago

4.2.0

4 years ago

4.1.0

4 years ago

4.0.0

4 years ago

3.1.1

4 years ago

3.1.0

4 years ago

3.0.0

4 years ago

2.0.0

4 years ago

1.0.0

4 years ago