Bug: [return-await] awaited promise allowed in terminal catch block #8663
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
bug
Something isn't working
locked due to age
Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Uh oh!
There was an error while loading. Please reload this page.
Before You File a Bug Report Please Confirm You Have Done The Following...
Playground Link
https://typescript-eslint.io/play/#ts=5.4.2&fileType=.tsx&code=IYZwngdgxgBAZgV2gFwJYHsLwBQEoYDeAUDDMgE5iEkwC%2BMUwyUAFtaaeQKbILlbAA7sFTIYABXLoAtqhBcAdNwBWXKMjwBuGrSK0gA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6aRfWaJ2gQwDufSvnRgA2pETRoAe2iQANFGa180QrTJ98ZABaQAuuDABfEKaA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=false
Repro Code
ESLint Config
tsconfig
Expected Result
Expected rule to flag on awaited promise in terminal catch block. From the docs:
see https://typescript-eslint.io/rules/return-await/#in-try-catch
Actual Result
no error reported
Additional Info
Strangely, there is actually a valid test case right now that is asserting this incorrect behavior
typescript-eslint/packages/eslint-plugin/tests/rules/return-await.test.ts
Lines 238 to 253 in fc08f96
The text was updated successfully, but these errors were encountered: