We have been encountering challenges in our app due to developers using async unnecessarily, particularly when the code is actually synchronous. This has led to issues like code running out of order and boolean statements returning unexpected results, especially when await is not used on a simple getter function.
For example:
async function aFunctionThatIsJustSyncronous() {
return false;
}
// would evaluate to true
if(aFunctionThatIsJustSyncronous()) {
}
We are actively looking for ways to identify and eliminate redundant async declarations in our codebase. Is there any linting tool available that can help us catch these errors, or do we need to be vigilant ourselves? This issue has caused problems for us in the past...