Bug: [no-unnecessary-type-assertion] fixer produces syntax error when there are some extra tokens before as
keyword
#8325
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.3.2&fileType=.tsx&code=BQRgBA1GBMYJRgIYGcwDsCuBbARgUwCcAocKaAegCokxLylVNdCg&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6Jge1tiacTJTIAhtEK0ipWkOTJE0fJQ5N0UOdA7RI4MAF8QOoA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=false
Repro Code
ESLint Config
tsconfig
Expected Result
It should be fixed to
Actual Result
It's fixed to
Additional Info
UPD: it also doesn't provide (but it should) fixes when type annotation of angle bracket assertion contains some extra tokens: playground
The text was updated successfully, but these errors were encountered: