Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
feat(return-await): require return await in try/catch blocks
Browse files Browse the repository at this point in the history
Returned promises will not be caught in an async function try/catch,
so this results in more consistent stack traces.
  • Loading branch information
keesvv committed Dec 2, 2020
1 parent 706b2c4 commit 9c1e113
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/typescript/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module.exports = {
extends: ['plugin:@typescript-eslint/recommended'],
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/return-await': 'error',
'@typescript-eslint/explicit-function-return-type': 1,
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
Expand Down

0 comments on commit 9c1e113

Please sign in to comment.