Skip to main content

What it flags

A promise-returning call is a bare statement in an async function or request handler, or array.forEach(async ...) runs awaits nobody waits for. Returning, awaiting, using void, or attaching a rejection callback suppresses the bare-call warning. Omitted or nullish callbacks do not handle rejections.

How to review or fix

Inside an async callback given to .on, .once, .addListener, .addEventListener, .prependListener or .prependOnceListener, no await fix is offered: the emitter ignores the callback’s promise, so awaiting would still leave the rejection unhandled. Attach .catch(handler) to the call instead. Test files and helpers listed under fireAndForget in the policy are skipped.

Configuration

Set the rule to "off" in loadwise.config.json to drop its findings: