@putout/plugin-convert-binary-expression-to-boolean
v2.1.1
Published
putout plugin adds ability to convert binary expression to boolean
Downloads
1,519
Maintainers
Readme
@putout/plugin-convert-binary-expression-to-boolean
putout
plugin adds ability to find and convert binary expression
to boolean
. Renamed to @putout/plugin-convert-comparison-to-boolean.
Install
npm i @putout/plugin-convert-binary-expression-to-boolean -D
Rule
{
"rules": {
"convert-binary-expression-to-boolean": "on"
}
}
❌ Incorrect code example
const t = 2 < 3;
✅ Correct code Example
const t = false;
License
MIT