typescript-eslint-language-service is a TypeScript language service plugin designed to integrate ESLint functionality directly into TypeScript-aware IDEs. It reports ESLint errors as TypeScript semantic diagnostics and offers code-fixes for applicable ESLint issues, providing a unified linting experience. The current stable version is 5.0.5, with releases typically driven by bug fixes and updates to its peer dependencies, notably `eslint` and `@typescript-eslint/parser`. Key differentiators include its seamless integration into the TypeScript language service, allowing real-time feedback and quick fixes for ESLint rule violations without needing separate build steps or processes for linting, treating lint errors as native compiler errors within the IDE. It relies on peer dependencies `typescript`, `@typescript-eslint/parser`, and `eslint` for its operation.
npm install typescript-eslint-language-serviceVerified import paths — ran on the pinned version, not inferred.
This `tsconfig.json` snippet demonstrates how to activate the TypeScript ESLint language service plugin in your project, enabling real-time ESLint feedback and auto-fixes directly within your IDE.
Ensure `eslint@^8` and `@typescript-eslint/parser@^5` are installed in your project. If you cannot upgrade these peer dependencies, you must use `typescript-eslint-language-service@4.x.x`.
Upgrade `@typescript-eslint/parser` to `^4`. If you cannot upgrade, use `typescript-eslint-language-service@3.x.x`.
Ensure the `TS_ESLINT_SERVICE_DISABLED` environment variable is not set, or set to a falsy value, when you expect ESLint diagnostics to be active within your TypeScript IDE.
Use the `watchDirs` option in your `tsconfig.json` plugin configuration to specify additional directories containing ESLint configuration files, for example: `{"name": "typescript-eslint-language-service", "watchDirs": ["config"]}`.Run `npm install -D eslint@^8 @typescript-eslint/parser@^5 typescript@^4` to install the required peer dependencies matching the `typescript-eslint-language-service@5.x.x` version.
Verify that the plugin name in `tsconfig.json` is exactly `"typescript-eslint-language-service"`. Confirm all peer dependencies (`eslint`, `@typescript-eslint/parser`, `typescript`) are correctly installed and meet the minimum version requirements. Check your IDE's logs for more specific error details.
Upgrade to `typescript-eslint-language-service@5.0.4` or newer to resolve known compatibility issues with `eslint@8.35.0`. Also, ensure any custom ESLint config file locations are included in the `watchDirs` plugin option in `tsconfig.json`.