no-unnecessary-type-parameters
UnreleasedConfiguration
Rule Details
Disallows type parameters that aren't used multiple times in a function, method, or class signature. A type parameter relates two or more positions in a signature; if it only appears once, it isn't relating anything, and the concrete type it stands for can be written directly instead.
Examples of incorrect code for this rule:
Examples of correct code for this rule:
Differences from ESLint
rslint resolves a few signature positions that the TypeScript public API keeps out of reach of upstream @typescript-eslint/no-unnecessary-type-parameters, and counts a type parameter appearing there as used. That makes for slightly fewer reports, all of them ones upstream raises in error.
The replaceUsagesWithConstraint suggestion parenthesizes the constraint wherever the type grammar calls for it, so applying it always leaves you with the same type the code had before.