The problem was the framework's bundler was transforming those functions to return promises, a linter would need to understand next.js's specific transforms to catch this.
A function returning a boolean cannot return a Promise. As simple as that!
Sure but if the framework also changes the signature of the function, there's nothing compiler can do. Unless you want it to catch `if(promise)`