-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed as not planned
Closed as not planned
Copy link
Labels
bugSomething isn't workingSomething isn't workinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.package: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-pluginworking as intendedIssues that are closed as they are working as intendedIssues that are closed as they are working as intended
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.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.package: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-pluginworking as intendedIssues that are closed as they are working as intendedIssues that are closed as they are working as intended