Bug: [no-unnecessary-type-parameters] misleading error messages #9664
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
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.5.2&fileType=.ts&code=GYVwdgxgLglg9mABABwIYCcDOBTAUphAHgBVFsAPKbMAE00UynRjAHMA%2BACheRCgC4GTFqwCUg0gG8AUIkTpsUEOiS4AygHkAcgDo0WbNzC8ooxKnrEA3NIC%2BQA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6Jge1tiacTJTIAhtEK0ipWsRFCAtonyJoqDJCXQO0SODABfELqA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eFYDAruuGAL4g9A&tokens=false
Repro Code
ESLint Config
tsconfig
Expected Result
I expect the error message should reflect correctly the number of times the type parameter is used.
Actual Result
"Type parameter T is used only once." in both cases
Additional Info
Let's also include a doc change to the docs page, if counting parameters is only supposed to be counting the usages in the signature?
The text was updated successfully, but these errors were encountered: