← All recipes
Moderne licensed

Simplify object pattern properties

Recipe IDorg.openrewrite.javascript.cleanup.simplify-object-pattern-propertyArtifact@openrewrite/recipes-react

Simplifies object destructuring patterns where the property name and variable name are the same (e.g., { x: x } becomes { x }).

Single recipeProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.javascript.cleanup.simplify-object-pattern-property

If the recipe isn’t available locally, install it with:

mod config recipes npm install @openrewrite/recipes-react