← All recipes
Moderne licensed

Detect async callbacks in synchronous array methods

Recipe IDorg.openrewrite.javascript.cleanup.async-callback-in-sync-array-methodArtifact@openrewrite/rewrite

Detects async callbacks passed to array methods like .some(), .every(), .filter() which don't await promises. This is a common bug where Promise objects are always truthy.

Single recipeasyncbugcleanuptypescriptjavascriptMSAL

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.async-callback-in-sync-array-method

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

mod config recipes npm install @openrewrite/rewrite