Simplify boolean literal comparisons

Proprietary

Removes redundant comparisons against boolean literals. For example, x === true becomes x and x === false becomes !x. Handles both strict (===/!==) and loose (==/!=) equality, where the operand is a boolean by construction, such as a comparison. In TypeScript, an operand only typed boolean may still be undefined, so for one x !== true becomes !x, and x === true becomes x only where the result is tested for truthiness. In JavaScript, where nothing enforces an inferred boolean type, such an operand is left unchanged.

io.moderne.javascript.cleanup.SimplifyBooleanLiteral
mod run . --recipe=io.moderne.javascript.cleanup.SimplifyBooleanLiteral

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.