In our app, we have problems with developers using async where it is not needed (the code is syncronous) and this is sometimes causing problems with code running in unexpected order or boolean statements returning true where they should not, because the caller might not use await e.g. on a simple getter function.
Example:
async function aFunctionThatIsJustSyncronous() {
return false;
}
// would evaluate to true
if(aFunctionThatIsJustSyncronous()) {
}
I am searching for ways to detect this and remove superfluous async statements in the code. Are there any linters that can detect this, or do we just have to watch out? It has bitten us some times in the past...