@putout/plugin-simplify-boolean-return
v2.0.0
Published
šPutout plugin adds ability to simplify boolean return
Downloads
24,993
Maintainers
Readme
@putout/plugin-simplify-boolean-return
š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