I'm not sure what is your preference here, but I've seen both styles:
} else {
and
{
else {
I think it would be nice to have a consistent style, and the former is
more common.
Rationale from the rule's page:
AMD-style require([]) and CommonJS-style require("") statements are
environment-specific and more difficult to statically analyze.
ES2015-style imports are part of the JavaScript language specfication
and recommended as the path going forward. TypeScript will compile them
to environment-specific forms as needed.
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.
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.