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:
async myFn() {
// code

// oops, I forgot to await:
doThing()

// more code
// fails at runtime because doThing()
// hasn't finished yet.

}
async myFn() {
// code

// oops, I forgot to await:
doThing()

// more code
// fails at runtime because doThing()
// hasn't finished yet.

}
C
CodyC486d ago
I've been searching/skimming https://lint.deno.land/ but don't see a relevant one yet.
UU
Unknown User486d ago
C
CodyC485d ago
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
function noAwait<T>(p: Promise<T>): void {}
function noAwait<T>(p: Promise<T>): void {}
To explicitly mark cases you don't want to wait for. (which is almost never in my admittedly limited experience)
More Posts
what is import.meta.url on implicit versionI am in an awkward situation where I want to test retrieving the version from the url of my module wDeno SDL2 Default Text Render Example (FFI problem w 1.29)Trying to get the font render example in the Deno SDL2 repo https://github.com/littledivy/deno_sdl2/third party module - edit webhook subdirectoryHi, I just published a module https://deno.land/x/sqlite_native@0.1.0 but the actual library contentPermissions dumpIs there a way to dump permissions to console or to a shell file after answering the prompts interacRemove trailing commasUsing the `deno.json` feature, how can I remove trailing commas? I can't find anything related to thCan you specify a git hash instead of version for npm modules?As the title mentions, I'd like to use a specific commit for an npm package. Is this possible?arch linux deno package might be brokenInstalling deno on arch linux appears to 404 on all the mirrors. I just synchronized them all as wel500 error in httpsdeno.landxfresh1.1.2srcserverhtmlescape.tsI'm having problems on my CI because this dependency returns a 500 error from deno.land. How can I dDisable Deno VSCode TS typesThis is a recent updates. I like to code in Javascript and the new types are incredibly distracting-discord.js with new npm importsHas anyone successfully used https://www.npmjs.com/package/discord.js with Deno's new import functioWebsocket client with headersI'm trying to create a websocket client that has an authorization header. It seems that a lot of theCan I programatically trigger a SIGINT event?I would like to trigger a SIGINT event from a file, is there a way to do this? For example in Node,