Closed as not planned
Closed as not planned
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Playground Link
Repro Code
export function test<T extends string>(method: T): string {
const args = '' as T;
return method + args;
}
ESLint Config
{
"rules": {
"@typescript-eslint/no-unnecessary-type-parameters": "error"
}
}
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.