This rule enforces using `x as y` instead of `<y>x` in order to cast
elements. This makes things easier to read and protects against
conflicts with tsx.
The forin rule forbids using the `for (let key in object)` syntax. This
is because iterating with `for in` also iterates over keys obtained from
prototypal inheritance. This is most of the time wrong and using `for
(let key of Object.keys(object)` protects against that.
This rule requires that all single line comments must start with a
space, i.e. `//hello` is forbidden and `// hello` is allowed.
This made me discover a few pre-processor macro in files that aren't
taken into account by the macro-preprocessor and so I've decided to
remove these directives.
Note that this rule must stay disabled for excmds.ts as it would break
our preprocessor macros.
Tslint and sonarts are pretty cool linters/static analyzers. Currently,
we ask them to ignore any of the rules that Tridactyl might not respect.
This enables progressively re-enabling rules and submitting small,
reviewable PRs that fix things.