facebook

After a successful CodeMix technical preview, we are happy to announce the official rebranding of Webclipse 2017 (v1.x) as CodeMix 2018 (v2.0).
Learn more about this evolution.

Using TSLint

Achieve a high level of TypeScript code quality by catching coding pitfalls and potential runtime problems early in the development process.

TSLint integration is available in MyEclipse, CodeMix, and Angular IDE.

TSLint is an extensible linter for TypeScript. While our existing TypeScript validator will already find syntax errors in your code, TSLint checks your code for readability, maintainability, and functionality errors – allowing you to fix them before running into them in production, at runtime.

So, how does our integration work? For Angular projects, a tslint.json is created in your project’s root folder; we use the settings in this configuration file when linting your project. Issues noticed are marked as warnings in the editors ruler area and in the Problems view. This ensures your Angular project conforms to NG best practices.

You can select the version of TSLint used to validate your project from the TypeScript Properties page. To access this page, right-click on the project, select Properties, and then select TypeScript. 

Beginning with 2017 CI 11, you have the option to show TSLint rule failures as warnings instead of errors. To select this option, go to Window>Preferences>TypeScript>TSLint and select the Always show rule failures as warnings checkbox. The option is selected by default. 

A key feature is our quick fix support – you can fix the problem automatically, remove the linting rule if you don’t like it, or simply turn off linting for the entire project. The number of quick fixes available right now are limited, but we’re working on adding more to the tooling soon. You also have the ability to add custom rules.

TSLint can catch a number of potential problems – from style issues like whitespace and indentation, to functionality issues like duplicate variables, unused expressions or variables used before they are declared. For a more complete list, please see: https://palantir.github.io/tslint/rules/.

We’re also working on adding better support for the tslint.json file, so it’s easy to get to the linting settings you really want for your team.

TSLint was introduced in version 2016 CI 9.