Skip to content

Commit

Permalink
feat: no-floating-promises
Browse files Browse the repository at this point in the history
closes #546

Signed-off-by: Naseem Ullah <24660299+naseemkullah@users.noreply.github.com>
  • Loading branch information
naseemkullah committed Jan 14, 2023
1 parent 3b9ab6d commit 33256b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-warning-comments": "off",
Expand All @@ -57,6 +58,7 @@
},
"parserOptions": {
"ecmaVersion": 2018,
"project": "./tsconfig.json",
"sourceType": "module"
}
}
Expand Down
9 changes: 4 additions & 5 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,8 @@ if (cli.input.length < 1) {
usage();
}

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

0 comments on commit 33256b9

Please sign in to comment.