Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I control which rules 'tslint --fix' auto fixes?

Is it possible to control which rules are auto-fixed when running tslint --fix? Ideally, I only want to autofix the whitespace and quotation rules, and I'll evaluate the rest manually. I can't seem to find anything in the documentation telling me which rules auto fix, or how to control which rules to apply though, and I'm a bit apprehensive about blindly fixing everything.

I'm currently using the tslint file that's autogenerated by Angular CLI.

like image 615
Sam Avatar asked Aug 07 '18 15:08

Sam


People also ask

How do I get rid of TSLint errors?

If you want to disable, just open tslint. json file and replace all true parameter with false. It would not check for any errors after that! That would disable ts lint fully.


1 Answers

You could always run tslint --fix using a separate tslint.json file that contains only the rules you want to fix. I believe the rules that auto-fix are the ones marked "Has Fixer" in the list.

like image 85
Matt McCutchen Avatar answered Nov 03 '22 01:11

Matt McCutchen