chore: enable no-floating-promises eslint rule
This MR introduces eslint
rule that ensures we handle every Promise
we create in the code. Without this rule, it's possible to call a function that returns a Promise
without awaiting the Promise
.
Documentation: https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-floating-promises.md
Why?
Even though it doesn't happen often, leaving a floating promise in the code leads to strange behaviour in both production code and tests.
Related
3 months ago we added return-await
rule that makes sure that we have to await promises in try/catch
blocks.
Edited by Tomas Vik