Lint for if you forgot to `await` a Promise?
If you have async methods that you call for their side effects, it's easy to forget to
await
them.
Is there a lint rule that I can enable for that? (Sort of like Rust's rules about unused Results?)
ex:
3 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Yeah, I knew about require-await, and it's enabled by default. (Which TBH I find a bit annoying. :p)
Yeah, I know there are some times where you don't want to await the promise. But if you enable the lint, you could handle that by just creating a function like
To explicitly mark cases you don't want to wait for. (which is almost never in my admittedly limited experience)