Skip to content

Commit

Permalink
Configure @typescript-eslint/return-await to warn on lacking await (#464
Browse files Browse the repository at this point in the history
)
  • Loading branch information
karlhorky authored Nov 28, 2024
1 parent 8cff7e5 commit a5d28a3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,11 @@ const configArray = [
// non-primitive data types like objects / arrays
// https://typescript-eslint.io/rules/restrict-template-expressions/
'@typescript-eslint/restrict-template-expressions': 'error',
// Warn about returning promises without `await`,
// which will result in worse stack traces
// https://typescript-eslint.io/rules/return-await/
'no-return-await': 'off',
'@typescript-eslint/return-await': ['warn', 'always'],
// Allow leaving out curlies only with single-line
// condition blocks
// https://github.com/eslint/eslint/blob/master/docs/rules/curly.md#multi-line
Expand Down

0 comments on commit a5d28a3

Please sign in to comment.