报告 async 函数中没有预期的 await 前缀的 async 函数调用。 此类调用返回 Promise,并且控制流会立即继续。

示例:


async function bar() { /* ... */ }
async function foo() {
    bar(); // 不良
}

应用快速修复后,将添加 await 前缀:


async function bar() { /* ... */ }
async function foo() {
    await bar(); // 优良
}

When the 'Report for promises in return statements' checkbox is selected, also suggests adding await in return statements.
While this is generally not necessary, it gives two main benefits.