Use operator-assignment shorthand where possible

Proprietary

Converts assignments like x = x + y into the equivalent operator-assignment shorthand x += y for the arithmetic and bitwise operators +, -, *, /, %, **, <<, >>, >>>, &, ^ and |. Replicates the autofix of the ESLint rule operator-assignment under its default options.

org.openrewrite.javascript.cleanup.OperatorAssignment
mod run . --recipe=org.openrewrite.javascript.cleanup.OperatorAssignment

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