Skip to content

Commit

Permalink
Ask ESLint to report floating Promises
Browse files Browse the repository at this point in the history
This rule is quite helpful in avoiding hard-to-debug missing `await`s.

Note: there are two locations in `src/main.ts` that trigger warnings:
the `run()` and the `cleanup()` function are called without `await` and
without any `.catch()` clause.

In the initial version of #379,
this was addressed by adding `.catch()` clauses. However, it was
determined that this is boilerplate code that will need to be fixed in a
broader way.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Oct 31, 2020
1 parent db75315 commit e5da2ad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Expand Up @@ -27,6 +27,7 @@
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
Expand Down

0 comments on commit e5da2ad

Please sign in to comment.