Git Product home page Git Product logo

tslint-language-service's Introduction

tslint-language-service

Build Status NPM version

TypeScript language service plugin for tslint.

To use it the plugin:

  • install the plugin with npm install tslint-language-service

  • enable the plugin in your tsconfig.json file:

{
  "compilerOptions": {
    "plugins": [
      { "name": "tslint-language-service"}
    ]
  }
}
  • If you are using TypeScript < 2.2.1, you must execute tsserver with tsserver-plugins.

Your node_modules folder should look like this:

  • node_modules
    • tslint
    • tslint-language-service
    • typescript

Notice due to an issue in the implementation of the no-unused-variable rule ([issue15344]), this rule will be disabled by the plugin. You can use the typescript compiler options noUnusedLocals and noUnusedParameters instead.

Editors Support

All editors which consumes tsserver (VSCode, Sublime, Eclipse, etc) can use tslint-language-service. Here a demo with Eclipse and tslint 5.0.0

tslint demo

Eclipse

Install typescript.java and you can use the TypeScript Project wizard which configures tslint-language-service.

VSCode

Visual Studio code provides a vscode-tslint extension, to avoid that the a file is linted twice you should disable this extension.

The most important differences between the vscode-tslint extension and the tslint-languageservice-plugin are:

  • the plugin shares the program representation with TypeScript. This is more efficient than the vscode-tslint extension which needs to reanalyze the document. Since vscode-tslint lints one file a time only, it cannot support tslint rules that require the type checker. The language service plugin doesn't have this limitation.
  • vscode-tslint provides additional features, please file issue requests for the features you are missing.

To use the plugin with VS Code:

  • If you are using the vscode-tslint extension disable or uninstall it.
  • Install the tslint-language-service and tslint as described above into your workspace.

tslint demo VS Code

tslint-language-service's People

Contributors

angelozerr avatar egamma avatar istar-eldritch avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.