Friday, June 3, 2016

Boost your TypeScript code quality with TSLint

TSLint checks your TypeScript code for readability, maintainability, and functionality errors.
Another words it acts like check-style for your TypeScript code, and if you'll add it into your IDE, you will be able to see specified guidelines violations highlighted.

How To


Install TypeScript & TSLint globally with npm:

npm install typescript -g
npm install tslint -g


Switch to your TypeScript project and generate tslint.jsonconfig file:

cd path/to/my/project
tslint --init
You can add tslint config dependency right into your package.json file, so it would be available right-after project installation:
"tslint-config-standard": "^1.0.0"


Specify your TSLint package into IDEA/Storm:

Under "Languages & Frameworks > TypeScript > TSLint" specify path to installed "TSLint package".
Mark "Search for tslint.json" option as well:




No comments:

Post a Comment