Skip to content

Commit 33256b9

Browse files
committed
feat: no-floating-promises
closes #546 Signed-off-by: Naseem Ullah <[email protected]>
1 parent 3b9ab6d commit 33256b9

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.eslintrc.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"plugin:@typescript-eslint/recommended"
3939
],
4040
"rules": {
41+
"@typescript-eslint/no-floating-promises": "error",
4142
"@typescript-eslint/no-non-null-assertion": "off",
4243
"@typescript-eslint/no-use-before-define": "off",
4344
"@typescript-eslint/no-warning-comments": "off",
@@ -57,6 +58,7 @@
5758
},
5859
"parserOptions": {
5960
"ecmaVersion": 2018,
61+
"project": "./tsconfig.json",
6062
"sourceType": "module"
6163
}
6264
}

src/cli.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,8 @@ if (cli.input.length < 1) {
177177
usage();
178178
}
179179

180-
run(cli.input[0], cli.input.slice(1)).then(success => {
181-
if (!success) {
182-
// eslint-disable-next-line no-process-exit
183-
process.exit(1);
184-
}
180+
run(cli.input[0], cli.input.slice(1)).catch(err => {
181+
console.error(err);
182+
// eslint-disable-next-line no-process-exit
183+
process.exit(1);
185184
});

0 commit comments

Comments
 (0)