Skip to content

Commit

Permalink
feat(eslint-config): enable return-await
Browse files Browse the repository at this point in the history
BREAKING CHANGE: The linter will reject code using `return await`
ouside of `try` blocks or forgetting to `await` before returning
from inside a `try` block.
Migration guide: use `return` outside of `try` blocks and `return await`
inside `try` blocks.

Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
  • Loading branch information
bajtos committed Dec 3, 2019
1 parent 4478f73 commit 02badb0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/eslint-config/eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ module.exports = {
'@typescript-eslint/prefer-optional-chain': 'error',
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/no-extra-non-null-assertion': 'error',
'@typescript-eslint/return-await': 'error',
},

overrides: [
Expand Down

0 comments on commit 02badb0

Please sign in to comment.