Disallow the use of Math.pow in favor of the ** operator

Proprietary

Replaces 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.PreferExponentiationOperator
mod run . --recipe=org.openrewrite.javascript.cleanup.PreferExponentiationOperator

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