Remove unused labels

Proprietary

Removes labels that are never referenced by a break or continue statement within the labeled statement, keeping the statement itself in place. Replicates the autofix of the ESLint rule no-unused-labels under its default options.

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

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