Bug: [no-unnecessary-type-assertion] (regression) false positives on template literals with no expressions #8819
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
Before You File a Bug Report Please Confirm You Have Done The Following...
Playground Link
https://typescript-eslint.io/play/#ts=5.4.3&fileType=.tsx&code=DYUwLgBAhhC8EAMoOgZwgYwPYDtVgG4AoUSAIzggHIyq1Nd8Cg&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6Jge1tiacTJTIAhtEK0ipWkOTJE0fJQ5N0UOdA7RI4MAF8QOoA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=false
Repro Code
ESLint Config
Expected Result
No lint errors should be reported, as the type assertions are meaningful.
Actual Result
The type assertion on the backtick strings is reported as unnecessary, while the quoted string is not reported.
Additional Info
A regression from #8740
The text was updated successfully, but these errors were encountered: