Is there a way to detect missing await
statements in Web JavaScript project?
Since JavaScript is so dynamic I doubt there is an analytic tool, but maybe is it possible using Google Web developer tool...
By missing is following code:
async createObject() => { ... }
async updateObject(object) => { ... }
// Incorrect
async () => {
const object = createObject();
await updateObject(object);
}
// Correct
async () => {
const object = await createObject();
await updateObject(object);
}