emptyTypeParameterLists
Reports empty type parameter lists in type aliases and interfaces.
✅ This rule is included in the ts stylistic presets.
TypeScript permits empty type parameter lists like <>, but this practice is unnecessary.
Empty type parameter lists can lead to unclear or ambiguous code where the intention is not self-evident.
Examples
Section titled “Examples”type Foo<> = string;interface Bar<> {}type Generic<> = { value: number };type Foo = string;interface Bar {}type Generic<T> = T;interface Container<T> { value: T;}Options
Section titled “Options”This rule is not configurable.
When Not To Use It
Section titled “When Not To Use It”If your codebase intentionally uses empty type parameter lists for specific tooling or code generation purposes, you may disable this rule.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”- Biome:
noEmptyTypeParameters
Made with ❤️🔥 in Boston by
Josh Goldberg and contributors.