Typed Linting with Project Service
"Typed linting", or enabling ESLint rules to understand TypeScript types, is one of the best parts of typescript-eslint. It enables a slew of more powerful lint rules that check for nuanced bugs, best practice violations, and other code issues that can only be detected using type information.
Typed linting hasn't always been straightforward to configure or performant at runtime.
We've seen users have to manage separate tsconfig.eslint.json
files to enable typed linting — sometimes with different compiler options than the rest of the project.
Not ideal.
In typescript-eslint 8.0, we stabilized a parserOptions.projectService
option that uses more powerful, streamlined TypeScript APIs than before.
The "Project Service" brings several benefits:
- ✍️ Configuration: simpler ESLint configs for typed linting with no ESLint-specific TSConfig files
- 🧠 Predictability: uses the same type information services as editors, including more reliability