I have some doubts with TSLint with ionic.
I have installed official TSLint rules for ionic from:
https://github.com/ionic-team/tslint-ionic-rules
Then I have installed globally tslint with:
npm install tslint typescript -g
How can I test my project and obtain the results with the CLI?
I have already tried with:
tslint -p /pathToRootProject > test.txt
But I am not sure if this is correct way.
On the other hand I have tried to do:
tslint --fix semicolon
But it returns:
'semicolon' does not exist. This will be an error in TSLint 6.
What I am doing wrong?
Thanks
I use the following command line to work with my project.
tslint --config ./tslint.json --project ./tsconfig.json --force --format stylish
--config and point to my tslint.json file with all the different rules I want to enforce.
--project uses the tsconfig.json, Typescript configuration for which files to build, options in Typescript to use with Linting, etc.
--force will return a status code of 0 (no errors even if the linter finds some) so my build process will continue.
--format to use the stylish formatter to get a nicer output that I prefer to use to clean up my code.
The complete TSLint command line interface guide is here.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.