feat(eslint): add lint rules that will notify user on missing await when calling async functions
Author: HotellCreated Aug 3, 2021Updated Sep 29, 2026
LabelsArea: Build SystemResolution: Soft CloseArea: Linting
current
- all good
await main();
function async main(){
// logic
doWork()
// logic
}
function async doWork(){
// ...logic
}expected
await main();
function async main(){
// logic
/* async function call missing AWAIT */ doWork()
// logic
}
function async doWork(){
// ...logic
}- we should enable/write a lint rule that will let you know about this issues. Also if you're missing
await(which is quite crucial and will crash our programs )
Originally posted by @Hotell in https://github.com/microsoft/fluentui/pull/19151#discussion_r681825086
Use cases caused by lack of tooling:
Source: microsoft/fluentui