Skip to content

Commit

Permalink
feat: disallow awaiting non thenable values (#110)
Browse files Browse the repository at this point in the history
To prevent unnecessary async, have the linter flag when we are awaiting a value that is not a thenable.
  • Loading branch information
mpetrunic authored Aug 30, 2022
1 parent 511821d commit 602fa7e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = {
'@typescript-eslint/prefer-function-type': 'off', // conflicts with 'etc/prefer-interface'
'@typescript-eslint/explicit-function-return-type': 'error', // functions require return types
'@typescript-eslint/no-this-alias': 'off', // allow 'const self = this'
'@typescript-eslint/await-thenable': 'error', // disallows awaiting a value that is not a "Thenable"
'jsdoc/require-param': 'off', // do not require jsdoc for params
'jsdoc/require-param-type': 'off' // allow compiler to derive param type
}
Expand Down

0 comments on commit 602fa7e

Please sign in to comment.