Use operator-assignment shorthand where possible
ProprietaryConverts assignments like x = x + y into the equivalent operator-assignment shorthand x += y for the arithmetic and bitwise operators +, -, *, /, %, **, <<, >>, >>>, &, ^ and |. Only applies where the target is a name, a property of a name or of this, or an element with a literal key, and is the left operand. An assignment whose comments the rewrite would drop is left unchanged, including, unlike ESLint, a comment inside the parentheses around the right side. Replicates the autofix of the ESLint rule operator-assignment under its default options.
io. moderne. javascript. cleanup. OperatorAssignmentmod run . --recipe= io. moderne. javascript. cleanup. OperatorAssignmentInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.