TypeScript language service plugin to check ESLint errors.
- Report ESLint errors as TypeScript semantic diagnostics
- Create code-fix for ESLint errors if they have fixer
typescript@typescript-eslint/parser>= 5.0.0eslint>= 8.0.0
npm install typescript-eslint-language-service -DAnd configure plugins section in your tsconfig.json, for example:
{ "compilerOptions": { "module": "commonjs", "target": "es5", "plugins": [ { "name": "typescript-eslint-language-service" } ] } }It's ready to go. Launch your TypeScript IDE.
type PluginOptions = { name: "typescript-eslint-language-service"; watchDirs?: string[]; };By default, this plugins watches only .eslintrc.* files that exist in your project root directory. If you want to watch other directories, add their names.
- Set
TS_ESLINT_SERVICE_DISABLEDenv parameter and restart your IDE to turn this plugin off.
- If your eslint version is < 8.0.0, install
typescript-eslint-language-service@4.x.x.
- If your @typescript-eslint tool's version is < 4.0.0, install
typescript-eslint-language-service@3.1.x. - If your @typescript-eslint tool's version is <= 3.4.0, install
typescript-eslint-language-service@3.0.x. - If your @typescript-eslint tool's version is <= 2.x.x, install
typescript-eslint-language-service@2.x.x.
MIT
