Simplify redundant logical expressions

Proprietary

Replace x && x with x and x || x with x. Identical operands in a logical expression are redundant and often indicate a copy-paste mistake.

org.openrewrite.javascript.cleanup.SimplifyRedundantLogicalExpression
mod run . --recipe=org.openrewrite.javascript.cleanup.SimplifyRedundantLogicalExpression

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