Remove conditional with identical branches

Proprietary

Replace if/else if/else chains where every branch has the same body with just the body, since the condition has no effect on what code executes. Only applies where the chain ends in an else, every branch is a block and no condition can have side effects, such as a property read that could run a getter.

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

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