@putout/plugin-convert-binary-expression-to-boolean

putout plugin adds ability to convert binary expression to boolean

Usage no npm install needed!

<script type="module">
  import putoutPluginConvertBinaryExpressionToBoolean from 'https://cdn.skypack.dev/@putout/plugin-convert-binary-expression-to-boolean';
</script>

README

@putout/plugin-convert-binary-expression-to-boolean NPM version Dependency Status

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