Reputation: 1314
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.
Upvotes: 7
Views: 3005
Reputation: 23174
As already said, you can use you own tslint.json, with your custom rules.
For the "evaluation" part of your problem, I suggest simply using your source-control. For instance, it's easy with Git to validate / discard changes by files, or even by lines / chunk.
Upvotes: 0
Reputation: 30929
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.
Upvotes: 9