1.1.0 β€’ Published 11 months ago

@putout/plugin-simplify-boolean-return v1.1.0

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

@putout/plugin-simplify-boolean-return NPM version

🐊Putout plugin adds ability to simplify boolean return.

Install

npm i @putout/plugin-simplify-boolean-return -D

Rule

{
    "rules": {
        "simplify-boolean-return": "on"
    }
}

Check out in 🐊Putout Editor.

❌ Example of incorrect code

function isA(a, b) {
    if (a.length === b.length)
        return true;
    
    return false;
}

βœ… Example of correct code

function isA(a, b) {
    return a.length !== b.length;
}

License

MIT

1.1.0

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago