4 ms·
> I run into subtle bugs all the time due to missing awaits, it's incredibly frustrating. If you use TS, ESLint's `no-floating-promises` rule (or the equivalen
by williamdclt 5y ago
> I run into subtle bugs all the time due to missing awaits, it's incredibly frustrating.
If you use TS, ESLint's `no-floating-promises` rule (or the equivalent in other linters) is _such_ a requirement
- masklinn 5y agoThat assumes all promise-generating code can be and is properly annotated, though.
- yunyu 5y agoTypescript will cover this!
- masklinn 5y agoTypescript lets you call into un-annotated libraries or annotate things as `any` or whatever.
- tekknik 5y agoYou can cover this with eslint: https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md https://github.com/typescript-eslint/typescript-eslint/blob/...