Bug: [no-unnecessary-type-parameters] false positive when used in the implementation of the method #9828
Closed
4 tasks done
Labels
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
working as intended
Issues that are closed as they are working as intended
Before You File a Bug Report Please Confirm You Have Done The Following...
Playground Link
https://typescript-eslint.io/play/#ts=5.5.4&fileType=.ts&code=KYDwDg9gTgLgBAMwK4DsDGMCWEVxsAZxgB4AVOUfFAEwLiKkxQHMA%2BACgFtgYALCagC44pAJTCGTZnADeAWABQcOGhxE4AQyjM6AXjgByA5rqkA3IuVQeSKLm58BcANSbtBCwoC%2BQA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6Jge1tiacTJTIAhtEK0ipWsRFCAtonyJoqDJCXQO0SODABfELqA&tsconfig=N4XyA&tokens=false
Repro Code
ESLint Config
tsconfig
Expected Result
No Error
Actual Result
Type parameter T is used only once in the function signature.eslint@typescript-eslint/no-unnecessary-type-parameters
Additional Info
Original Code: https://github.com/faker-js/faker/blob/cc7715bebded681655b95f5afc368cb250a2eadf/test/support/seeded-runs.ts#L172-L192
The error was first observed in v8.1.0 it does not appear in 7.18.0
The rule seems to ignore any usage of the type inside the actual implementation.
The text was updated successfully, but these errors were encountered: