Disallow initializing variables to undefined

Proprietary

Removes redundant undefined initializers from let declarations, e.g. let foo = undefined; becomes let foo;. Replicates the autofix of the ESLint rule no-undef-init under its default options.

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

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