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. A call is left unchanged where a binding named Math is in scope, or inside a with statement, whose object may supply Math. Replicates the autofix of the ESLint rule prefer-exponentiation-operator under its default options.

io.moderne.javascript.cleanup.PreferExponentiationOperator
mod run . --recipe=io.moderne.javascript.cleanup.PreferExponentiationOperator

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