Skip to content

Commit a5d28a3

Browse files
authoredNov 28, 2024··
Configure @typescript-eslint/return-await to warn on lacking await (#464)
1 parent 8cff7e5 commit a5d28a3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎index.js

+5
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,11 @@ const configArray = [
811811
// non-primitive data types like objects / arrays
812812
// https://typescript-eslint.io/rules/restrict-template-expressions/
813813
'@typescript-eslint/restrict-template-expressions': 'error',
814+
// Warn about returning promises without `await`,
815+
// which will result in worse stack traces
816+
// https://typescript-eslint.io/rules/return-await/
817+
'no-return-await': 'off',
818+
'@typescript-eslint/return-await': ['warn', 'always'],
814819
// Allow leaving out curlies only with single-line
815820
// condition blocks
816821
// https://github.com/eslint/eslint/blob/master/docs/rules/curly.md#multi-line

0 commit comments

Comments
 (0)
Please sign in to comment.