Bug: [consistent-type-assertions] autofix breaks type assertion of return value #6884
Closed
4 tasks done
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
bug
Something isn't working
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Before You File a Bug Report Please Confirm You Have Done The Following...
Playground Link
https://typescript-eslint.io/play/#ts=5.0.3&sourceType=module&code=C4TwDgpgBAYg9nKBeKBvKAjAhgJwFxQB2ArgLYYQ4DcUAvgFADGchAzsFAB7JQAUAlMgB8UADzw4Q9NnxQArHSpA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6MgeyeUuX0Ra0ipWgENkyRNHyUuqDAG1IU6B2iQANJnDYc4ydNlMAykSToo4yDogBfALo7bIW0A&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA
Repro Code
ESLint Config
tsconfig
No response
Expected Result
I expected the following autofix.
Actual Result
The following autofix breaks TypeScript syntax.
Additional Info
Ref: #6641
The text was updated successfully, but these errors were encountered: