eppsilon / vscode-typescript-tslint-plugin

VS Code extension that provides TSLint support using the typescript-tslint-plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adds tslint to VS Code using the TypeScript TSLint language service plugin.

Please refer to the tslint documentation for how to configure the linting rules.

Usage

Important: If you also have the vscode-tslint extension in VS Code installed, please disable it to avoid that files are linted twice.*

This extension works out of the box with VS Code's built-in version of TypeScript. You do not need to configure the plugin in your tsconfig.json if you are using VS Code's version of TypeScript.

If you are using a workspace version of typescript, you must currently configure the TS Server plugin manually by following these instructions

Differences with the vscode-TSLint extension

  • Configuration options for TSLint are specified inside the tsconfig.json.

  • The implementation as a TypeScript server plugin enables to shares the program representation with TypeScript. This is more efficient than the current vscode-tslint implementation. The current TSLint implementation needs to reanalyze a document that has already been analyzed by the TypeScript language server.

  • vscode-tslint can only lint one file a time. It therefore cannot support semantic tslint rules that require the type checker. The language service plugin doesn't have this limitation. To overcome this limitation is a key motivation for reimplementing the extension.

  • This extension requires that the tslint and typescript modules are installed either locally or globally. The vscode-tslint extension will use the tslint module that is installed closest to the linted file. To install tslint and typescript globally you can run npm install -g tslint typescript.

About

VS Code extension that provides TSLint support using the typescript-tslint-plugin

License:MIT License