Disallow the use of Math.pow in favor of the ** operator
ProprietaryReplaces Math.pow(base, exponent) calls with the ES2016 exponentiation operator base**exponent, inserting parentheses around the base, the exponent, or the whole expression where operator precedence requires them. Replicates the autofix of the ESLint rule prefer-exponentiation-operator under its default options.
org. openrewrite. javascript. cleanup. PreferExponentiationOperatormod run . --recipe= org. openrewrite. javascript. cleanup. PreferExponentiationOperatorInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.