From bc246e2f96e9a980d209a7bde123080b145909b5 Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Wed, 24 Nov 2021 06:37:12 +0000 Subject: [PATCH] add new eslint rule to catch unawaited promises --- server/.eslintrc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/server/.eslintrc b/server/.eslintrc index 9cf44c8b1..976dbe7b3 100644 --- a/server/.eslintrc +++ b/server/.eslintrc @@ -8,6 +8,19 @@ "@typescript-eslint", "import" ], + "overrides": [ + { + "files": [ + "*.ts", + "*.tsx" + ], + "parserOptions": { + "project": [ + "./tsconfig.json" + ] + } + } + ], "parser": "@typescript-eslint/parser", "parserOptions": { "sourceType": "module", @@ -37,6 +50,7 @@ ], "@typescript-eslint/explicit-module-boundary-types": "off", "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/no-misused-promises": "error", "@typescript-eslint/no-unused-vars": [ "warn", {