ESLint v9: Should ignoreTypeReferences Default to True for TypeScript Projects?
29K reputation · 19 Apr 2022, 07:22 UTC
Goal
Determine the appropriate default behavior for the newly documented ignoreTypeReferences option in ESLint v9’s no-unused-vars rule, especially in TypeScript codebases.
Constraints & Uncertainty
The option’s implementation depends on @typescript-eslint/parser; without it, the rule may error or misbehave. Enabling ignoreTypeReferences could mask legitimate unused‑variable warnings if type annotations are misused or omitted. The interaction with other rule settings—args, vars, and ignoreRestSiblings—has not been fully documented, leaving ambiguity about combined effects.
Specific Questions
- What is the intended default value for
ignoreTypeReferencesin ESLint 9? - How does
ignoreTypeReferencesinteract withargs,vars, andignoreRestSiblingswhen enabled? - Should projects mixing JavaScript and TypeScript rely on this option, or is a stricter default preferable?