There's an entire class of error that can be categorically eliminated by always using await whenever there is a promise.
Consider this simple refactor:
async function doStuff() {
return theOnlyFunctionIThoughtIWouldEverNeed();
}
async function doStuff() {
let x = theOnlyFunctionIThoughtIWouldEverNeed();
let y = doMoreThings(x); // error, expected 'x' to be a value, not a promise
return y;
}
or this one, following the "return something, or return nothing" philosophy:
async function doStuff() {
theOnlyFunctionIThoughtIWouldEverNeed();
}
which should instead be
async function doStuff() {
await theOnlyFunctionIThoughtIWouldEverNeed();
}
Also, await lends clarity to the reader when it's non-obvious that the function being called is a promise / async function.
Hence the original should be:
async function doStuff() {
return await theOnlyFunctionIThoughtIWouldEverNeed();
}
I would put this in the same category as curly: true in terms of its usefulness and the kinds of problems that it solves.