Bug: [no-unnecessary-type-assertion] errors not reported when using unnecessary literal assertions on const
variable declarations
#8566
Labels
bug
Something isn't working
duplicate
This issue or pull request already exists
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#eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6Jge1tiacTJTIAhtEK0ipWkOTJE0fJQ5N0UOdA7RI4MAF8QOoA&code=MYewdgzgLgBAZiEMC8MA8BmAfBg3EA
Repro Code
ESLint Config
tsconfig
Expected Result
3
should be reported as an unnecessary type assertion, since removing it has no effect.Actual Result
The type assertion was not reported.
Additional Info
Raised originally in #8458 and solution opened in #8558. Breaking this out from the original issue into a separate issue.
The text was updated successfully, but these errors were encountered: