Codelyzer: Support the tslint fix

Created on 10 Jan 2017  路  4Comments  路  Source: mgechev/codelyzer

Hi,

This is a feature request.

Some rules can be automatically fixed by tslint. They've created a mechanism to know if it's a fixable rule and creates a fix if it was required.

Some of codelyzer rules are fixable, (white space for example). And I think it would be very nice to have this rules fixed automagically when possible (specially if you have a project without that rule and starts using the rule).

enhancement help wanted P3

Most helpful comment

Autofixes are in the roadmap. Since I have a few other things on my plate before that, it'll be lovely if anyone is willing to help.

The API is user friendly. (Un)Fortunately because of the current format of the TypeScript AST it is mostly an abstraction on top of primitive string manipulations.

All 4 comments

Autofixes are in the roadmap. Since I have a few other things on my plate before that, it'll be lovely if anyone is willing to help.

The API is user friendly. (Un)Fortunately because of the current format of the TypeScript AST it is mostly an abstraction on top of primitive string manipulations.

I'll try to help with this.

Hi,

I also tried to provide a tslint fix for a rule (see #300) like described in the docs of tslint: https://palantir.github.io/tslint/develop/custom-rules/

My provided fix was recognised by VS Code but unfortunately was not applied when clicking on the tooltip.

Do you know what is needed to get tslint fixes to work?

Kind regards
Gregor

We're working incrementally on supporting tslint fixes. We have them for all newly implemented rules.

Closing this one since it's quite generic.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fabioemoutinho picture fabioemoutinho  路  5Comments

Martin-Wegner picture Martin-Wegner  路  6Comments

wKoza picture wKoza  路  6Comments

michaeljota picture michaeljota  路  4Comments

KKrisu picture KKrisu  路  5Comments