Disallow unnecessary labels
ProprietaryRemoves the label from break and continue statements whose label targets the innermost enclosing loop or switch anyway, e.g. break A; becomes break; when the directly enclosing loop is labeled A. The label declaration itself is left in place. Replicates the autofix of the ESLint rule no-extra-label under its default options.
org. openrewrite. javascript. cleanup. NoExtraLabelmod run . --recipe= org. openrewrite. javascript. cleanup. NoExtraLabelInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.