From 602fa7e67dbdf0e06ec8295b7b17b253e02839ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marin=20Petruni=C4=87?= Date: Tue, 30 Aug 2022 09:49:50 +0200 Subject: [PATCH] feat: disallow awaiting non thenable values (#110) To prevent unnecessary async, have the linter flag when we are awaiting a value that is not a thenable. --- ts.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ts.js b/ts.js index 73f4166..29c40aa 100644 --- a/ts.js +++ b/ts.js @@ -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 }