-
Notifications
You must be signed in to change notification settings - Fork 14
TypeScript Plugins
Angelo edited this page Apr 21, 2017
·
3 revisions
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.
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
typing
in the editor and benefit too withquick fixes
. - when you compile TypeScript
Here a demo with tslint:
- TypeScript IDE
- New and Noteworthy