TypeScript Plugins
TypeScript Plugins
Language Service Plugins with Proxies is planned for TypeScript 2.3. This feature gives the capability to extend TypeScript tsserver completion, definition, diagnostics, etc with custom plugins. Today it exists 2 plugins :
- Angular2 language service which provide completion, definition, diagnostics for @Component/template
- tslint language service which provides diagnostics, codefix by consuming tslint.
Enable tslint
Here the step to enable tslint:
- activate tsserver-plugins if you are consuming TypeScript < 2.2.1.

-
the node_modules of your TypeScript Runtime must contain tslint and tslint language service like this node_modules. If you are consuming last version of embedded TypeScript, it will work directly.
-
declare your tsconfig.json like this:
{
"compilerOptions": {
"plugins": [
{ "name": "tslint-language-service"}
]
}
}After you will benefit with tslint:
- when you are
typingin the editor and benefit too withquick fixes. - when you compile TypeScript
Here a demo with tslint:
