Skip to content
vetkitChecksChangelogDocumentation

vetkit.js.quality.async-promise-executor

An async function is used as a Promise executor. Errors thrown after the first await are lost instead of rejecting the promise, and the wrapper is usually unnecessary.

Last updated:

Suite: Code quality

javascript, typescript

An async function is used as a Promise executor. Errors thrown after the first await are lost instead of rejecting the promise, and the wrapper is usually unnecessary.

Category: QUALITY · Engine rule severity: WARNING

How to fix it

Remove the new Promise wrapper and use the async function directly.

References

Source: packages/engine/rules/quality/javascript.yml.

Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.