@putout/plugin-remove-boolean-from-logical-expressions

putout plugin adds ability to find and remove test.boolean-from-logical-expressions calls

Usage no npm install needed!

<script type="module">
  import putoutPluginRemoveBooleanFromLogicalExpressions from 'https://cdn.skypack.dev/@putout/plugin-remove-boolean-from-logical-expressions';
</script>

README

@putout/plugin-remove-boolean-from-logical-expression NPM version Dependency Status

putout plugin adds ability to find and remove constant conditions.

Install

npm i @putout/plugin-remove-boolean-from-logical-expression -D

Rule

{
    "rules": {
        "remove-boolean-from-logical-expression": "on"
    }
}

❌ Incorrect code example

const t = true && false;

✅ Correct code Example

const t = false;

License

MIT