Skip to content

Latest commit

 

History

History
66 lines (47 loc) · 1.67 KB

File metadata and controls

66 lines (47 loc) · 1.67 KB

typescript-eslint-language-service

CircleCI npm version deps GitHub license

TypeScript language service plugin to check ESLint errors.

Screencast

Features

  • Report ESLint errors as TypeScript semantic diagnostics
  • Create code-fix for ESLint errors if they have fixer

Usage

Requirements (peer dependencies)

  • typescript
  • @typescpt-eslint/parser
  • @typescpt-eslint/typescript-estree
  • eslint

Install

npm install typescript-eslint-language-service

Configure

And 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.

Plugin options

type PluginOptions = {
  name: "typescript-eslint-language-service",
  watchDirs?: string[];
};

watchDirs

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.

LICENSE

MIT