Tslint: CLI interface for rule fixes

Created on 1 Sep 2016  路  4Comments  路  Source: palantir/tslint

API P1 Fixed Feature Request

Most helpful comment

I've been developing fixes by running them across the whole Angular codebase. This helps find a lot of corner cases (like in #1568 I discovered I was deleting license blocks if they were leading trivia on an unused import statement).

We need to have a discussion of a right way for exposing the CLI, but a quick solution for advanced users is to just have a formatter that does this. Then you add -t applyFixes to your CLI command and the fixes are produced and written on the filesystem.

I'll send a PR to upstream that, I think it's a good intermediate solution to allow more people to experiment with fixes. That helps us get fixes implemented in a bunch of rules, which is a co-requisite to getting value out of the CLI for applying them.

All 4 comments

I've been developing fixes by running them across the whole Angular codebase. This helps find a lot of corner cases (like in #1568 I discovered I was deleting license blocks if they were leading trivia on an unused import statement).

We need to have a discussion of a right way for exposing the CLI, but a quick solution for advanced users is to just have a formatter that does this. Then you add -t applyFixes to your CLI command and the fixes are produced and written on the filesystem.

I'll send a PR to upstream that, I think it's a good intermediate solution to allow more people to experiment with fixes. That helps us get fixes implemented in a bunch of rules, which is a co-requisite to getting value out of the CLI for applying them.

yeah, I like that approach to get auto-fixing out the door sooner. thanks for the PR.

@alexeagle looking forward to the PR, thanks!

I believe this was fixed with #1697

Was this page helpful?
0 / 5 - 0 ratings