4 ms·
> It's just too easy to forget to await on a function returning a Future/Promise. Is there not a way with linting configurations to bump this warning to a "co
by MuffinFlavored 3y ago
> It's just too easy to forget to await on a function returning a Future/Promise.
Is there not a way with linting configurations to bump this warning to a "compile time error" (unless marked ignore or something)?
- eddd-ddde 3y agoYes now a days every sensible project comes with a linter by default that will tell you when you are using a promise wrong.
- icambron 3y agoThat seems extreme. In both JS and Rust, it’s not unusual to not await the promise/future immediately and just deal with the returned promise directly. Presumably that’s why neither language awaits for you automatically. I would be pretty annoyed if the linter yelled at me every time I did that.