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:
4 Replies
Unknown User•3y 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)
Maybe typescript-eslint works in Deno nowadaysI'm also trying to figure out how! https://stackoverflow.com/questions/79354265/using-typescript-eslint-with-deno
Stack Overflow
Using typescript-eslint with Deno
typescript-eslint recommends using "dual-linting" with Deno...
using those linters for what they support, then adding in ESLint for typed linting in a parallel or second step
...but doe...