From 221be43a1660cc9b3c8acb795e0dfae67bcad418 Mon Sep 17 00:00:00 2001 From: Steven Wang Date: Thu, 17 Mar 2022 17:28:59 +1000 Subject: [PATCH] fix: allow `return await` in `try-catch` block (#282) This allows for correct async error handling behaviour Fixes #280 --- lib/shared.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/shared.js b/lib/shared.js index 62b21e1..08e35b5 100644 --- a/lib/shared.js +++ b/lib/shared.js @@ -208,7 +208,7 @@ module.exports = { // Replace Airbnb 'no-return-await' rule with '@typescript-eslint' version // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/return-await.md 'no-return-await': 'off', - '@typescript-eslint/return-await': [baseBestPracticesRules['no-return-await'], 'never'], + '@typescript-eslint/return-await': [baseBestPracticesRules['no-return-await'], 'in-try-catch'], // Replace Airbnb 'space-infix-ops' rule with '@typescript-eslint' version // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-infix-ops.md