Commit graph

3 commits

Author SHA1 Message Date
Simon Marchi
b4d539258e tslint: Extend tslint:recommended
Rather than take a whitelist approach to the rules, I think it would be
better to start with some goal (for example, the tslint:recommended set
of rules) and disable those that we don't follow.  This way, it's easy
to see which ones we could potentially enable.

This doesn't mean that we have to follow all of them.  If there are
rules that we don't want, we can move them to a "Rules from
tslint:recommended that we don't want" section.
2018-07-17 18:48:38 -04:00
Simon Marchi
d0dc094f4e tslint: Enable no-null-keyword
I find this rule quite useful so that we use undefined all the time.
The rationale on the rule's documentation page is quite clear:

https://palantir.github.io/tslint/rules/no-null-keyword/
2018-07-17 18:48:05 -04:00
Simon Marchi
1244e4133c Enable tslint with basic rules
Add tslint as a plugin to tsc, so that they will show up in vscode or
whatever editor people use.  I only enabled two basic rules that I think
are very useful, prefer-const and no-var-keyword.  Violations of these
rules were fixed with "tslint -p . --fix".  There was one unused
variable (in the isExpandable) function that I removed by hand.
2018-07-17 18:19:37 -04:00