prefer-await-in-async-return
Prefer explicit await when an async function directly returns one typed Promise .then transform.
Why
Mixing a directly returned Promise callback into otherwise async control flow makes sequencing and failures harder to read.
Fix
Consider awaiting the Promise and returning the transformed value with ordinary async statements. Preserve catch boundaries, callback behavior, and observable scheduling when rewriting manually.
Examples
async function load() { return Promise.resolve(1).then((value) => value + 1);}async function load() { const value = await Promise.resolve(1); return value + 1;}