Bug: no-floating-promises
should not fire on Promise.resolve()
#9192
Labels
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
wontfix
This will not be worked on
working as intended
Issues that are closed as they are working as intended
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.5&fileType=.tsx&code=FABQTg9gtglgzgUwHRgXCAbAbggFASgG5gg&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6Jge1oDN4OBDfMwDmtYtA4BbSshTooiaBOiRwYAL4hNQA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=false
Repro Code
ESLint Config
tsconfig
Expected Result
The rule should not trigger because it's impossible for
Promise.resolve()
to fail. Thus, there is no need for a catch. The rule should only trigger when a promise is passed toPromise.resolve
Actual Result
Additional Info
No response
The text was updated successfully, but these errors were encountered: