Enforce dot notation whenever possible

Proprietary

Converts bracket notation property accesses with constant, identifier-safe keys to dot notation. For example, obj["prop"] becomes obj.prop and obj?.["prop"] becomes obj?.prop. Replicates the autofix of the ESLint rule dot-notation under its default options.

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

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