From 1aae8e8ca598c2fa40ae48b6f11dedd16b224515 Mon Sep 17 00:00:00 2001 From: Naseem Ullah <24660299+naseemkullah@users.noreply.github.com> Date: Sat, 14 Jan 2023 14:24:12 -0500 Subject: [PATCH] feat: no-floating-promises closes https://github.com/google/gts/issues/546 Signed-off-by: Naseem Ullah <24660299+naseemkullah@users.noreply.github.com> --- .eslintrc.json | 2 ++ src/cli.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/.eslintrc.json b/.eslintrc.json index 5bba7289..dc77e888 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -38,6 +38,7 @@ "plugin:@typescript-eslint/recommended" ], "rules": { + "@typescript-eslint/no-floating-promises": "warn", "@typescript-eslint/no-non-null-assertion": "off", "@typescript-eslint/no-use-before-define": "off", "@typescript-eslint/no-warning-comments": "off", @@ -57,6 +58,7 @@ }, "parserOptions": { "ecmaVersion": 2018, + "project": "./tsconfig.json", "sourceType": "module" } } diff --git a/src/cli.ts b/src/cli.ts index 5af1b549..d58724ba 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -177,6 +177,7 @@ if (cli.input.length < 1) { usage(); } +// eslint-disable-next-line @typescript-eslint/no-floating-promises run(cli.input[0], cli.input.slice(1)).then(success => { if (!success) { // eslint-disable-next-line no-process-exit