Disallow multiple spaces in regular expressions
ProprietaryReplaces runs of two or more consecutive spaces in regular expression literals and string-literal RegExp(...) patterns with a {n} quantifier, e.g. /foo bar/ becomes /foo {3}bar/. Replicates the autofix of the ESLint rule no-regex-spaces under its default options.
org. openrewrite. javascript. cleanup. NoRegexSpacesmod run . --recipe= org. openrewrite. javascript. cleanup. NoRegexSpacesInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.