Tslint: List all rules that haven't been specified in your tslint.json

Created on 31 Mar 2017  路  5Comments  路  Source: palantir/tslint

Wow, tslint has improved so much - awesome! However, there are so many new rules now it's hard to keep track of them.

Is there a way to list all rules that haven't been explicitly specified in your tslint.json?

That way, when new rules come out, I can just run a command, look at the list of new rules that aren't specified in my tslint.json, read up on the documentation and specify them. This is better than my suboptimal eyeballing at the moment.

Declined

Most helpful comment

Hacked up something just now: https://github.com/khoomeister/check-tslint-all

All 5 comments

Fair point. We're working on a tslint:all configuration that lists all the rules (https://github.com/palantir/tslint/pull/2417). Do you think that sufficiently addresses this problem?

It would also be pretty easy to write a Node script to compare your list of configured rules to the list of files that match node_modules/tslint/lib/rules/*Rule.js. This code does something close to this.

How about if you use custom rules, like tslint-react, etc.?

Is there some code path which reads the extends & rulesDirectory settings and makes a list of every single rule available? Then I can use this to diff against tslint.json.

Hacked up something just now: https://github.com/khoomeister/check-tslint-all

Thanks for that check-tslint-all! This seems out of scope for TSLint itself, so closing this issue for now. If there's a spike in interest we can always revisit.

This feature will be very helpful for developers as they can quickly check as to which rules have been newly added.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zewa666 picture zewa666  路  3Comments

mrand01 picture mrand01  路  3Comments

ghost picture ghost  路  3Comments

denkomanceski picture denkomanceski  路  3Comments

cateyes99 picture cateyes99  路  3Comments