{"id":12231,"library":"typescript-eslint-language-service","title":"TypeScript ESLint Language Service Plugin","description":"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.","status":"active","version":"5.0.5","language":"javascript","source_language":"en","source_url":"https://github.com/Quramy/typescript-eslint-language-service","tags":["javascript","TypeScript","ESLint","typescript"],"install":[{"cmd":"npm install typescript-eslint-language-service","lang":"bash","label":"npm"},{"cmd":"yarn add typescript-eslint-language-service","lang":"bash","label":"yarn"},{"cmd":"pnpm add typescript-eslint-language-service","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core TypeScript language service functionality.","package":"typescript","optional":false},{"reason":"Required for ESLint to parse TypeScript code.","package":"@typescript-eslint/parser","optional":false},{"reason":"Core ESLint functionality for linting.","package":"eslint","optional":false}],"imports":[{"note":"This package is a TypeScript language service plugin and is configured via `tsconfig.json`'s `compilerOptions.plugins` array, not imported directly into JavaScript/TypeScript code. The `name` property within the plugin object must exactly match the package name.","wrong":"import { PluginName } from 'typescript-eslint-language-service';\nconst plugin = require('typescript-eslint-language-service');","symbol":"typescript-eslint-language-service","correct":"{\n  \"compilerOptions\": {\n    \"plugins\": [\n      {\n        \"name\": \"typescript-eslint-language-service\",\n        \"watchDirs\": [\"src\"]\n      }\n    ]\n  }\n}"},{"note":"While not directly imported, the `PluginOptions` type illustrates the configurable properties of the plugin when defined in `tsconfig.json`.","symbol":"PluginOptions","correct":"type PluginOptions = {\n  name: \"typescript-eslint-language-service\";\n  watchDirs?: string[];\n};"}],"quickstart":{"code":"{\n  \"compilerOptions\": {\n    \"target\": \"es2020\",\n    \"module\": \"esnext\",\n    \"lib\": [\"es2020\", \"dom\"],\n    \"strict\": true,\n    \"esModuleInterop\": true,\n    \"skipLibCheck\": true,\n    \"forceConsistentCasingInFileNames\": true,\n    \"jsx\": \"react-jsx\",\n    \"moduleResolution\": \"node\",\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@/*\": [\"src/*\"]\n    },\n    // Configure the TypeScript ESLint Language Service plugin\n    // This enables ESLint errors and fixes to appear directly in your IDE\n    \"plugins\": [\n      {\n        \"name\": \"typescript-eslint-language-service\",\n        // Optionally, specify additional directories to watch for ESLint config changes.\n        // By default, only .eslintrc.* files in the project root are watched.\n        // Example: \"watchDirs\": [\"config\", \"eslint-rules\"]\n      }\n    ]\n  },\n  \"include\": [\"src/**/*.ts\", \"src/**/*.tsx\", \".eslintrc.js\"],\n  \"exclude\": [\"node_modules\", \"dist\"]\n}","lang":"json","description":"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."},"warnings":[{"fix":"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`.","message":"Version 5.0.0 introduced breaking changes, requiring `eslint` version `8.0.0` or higher and `@typescript-eslint/parser` version `5.0.0` or higher as peer dependencies.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Upgrade `@typescript-eslint/parser` to `^4`. If you cannot upgrade, use `typescript-eslint-language-service@3.x.x`.","message":"Version 4.0.0 introduced breaking changes, requiring `@typescript-eslint/parser` version `4.0.0` or higher as a peer dependency.","severity":"breaking","affected_versions":">=4.0.0 <5.0.0"},{"fix":"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.","message":"The plugin's functionality can be disabled by setting the `TS_ESLINT_SERVICE_DISABLED` environment variable, which might lead to unexpected lack of ESLint feedback in your IDE.","severity":"gotcha","affected_versions":"*"},{"fix":"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\"]}`.","message":"By default, the plugin only watches `.eslintrc.*` files in the project root. If your ESLint configuration files are located elsewhere, changes to them might not be immediately reflected.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"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.","cause":"Missing or incompatible peer dependencies preventing the plugin from loading or functioning correctly.","error":"Cannot find package 'eslint' or package '@typescript-eslint/parser'"},{"fix":"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.","cause":"Incorrect configuration in `tsconfig.json`, an incompatible Node.js/TypeScript version, or issues with peer dependency resolution.","error":"Language service plugin 'typescript-eslint-language-service' could not be loaded."},{"fix":"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`.","cause":"Compatibility issues with newer ESLint versions (e.g., specific bug fixed in plugin version 5.0.4) or incorrect `watchDirs` configuration.","error":"ESLint rules are not being applied, or configuration changes are not picked up after `eslint@8.35.0`."}],"ecosystem":"npm"}