Commit graph

45 commits

Author SHA1 Message Date
glacambre
923f9caf92
TSLint: enable no-unused-declaration rule
This rule requires adding a new set of rules, tslint-etc.
no-unused-declaration used to be available in tslint:recommended but was
deprecated when --noUnusedVariables was added to typescript. The problem
with using TypeScript's --noUnusedVariables is that it turns unused
declarations into an error and prevents compilation, which isn't fun
when you're just prototyping things.
2019-04-16 08:30:31 +02:00
glacambre
af20bbe4df
TSLint: re-enable no-identical-functions rule 2019-04-15 19:47:41 +02:00
glacambre
3fe1e5a091
TSLint: re-enable no-empty rule 2019-04-14 10:27:22 +02:00
glacambre
2b11d1d464
TSLint: re-enable prefer-const rule 2019-04-14 08:01:26 +02:00
glacambre
0a8c3cd2f6
TSLint: re-enable whitespace rule 2019-04-12 05:54:31 +02:00
glacambre
37dfddca4e
TSLint: ignore generated files
This enables removing file-specific rules-disabling comments in
excmds.ts
2019-04-12 05:50:01 +02:00
glacambre
f16dc99589
TSLint: re-enable no-var-keyword rule 2019-04-10 06:54:10 +02:00
glacambre
5f05833cde
TSLint: re-enable no-variable-usage-before-declaration rule 2019-04-10 06:51:14 +02:00
glacambre
bd65146ca8
TSLint: re-enable no-unnecessary-initializer rule 2019-04-10 06:47:46 +02:00
glacambre
3ff4713247
TSLint: re-enable no-trailing-whitespace rule 2019-04-10 06:39:19 +02:00
glacambre
00ce513ccc
TSLint: re-enable no-conditional-assignment rule 2019-04-05 13:38:14 +02:00
glacambre
3953830787
TSLint: re-enable import-spacing rule 2019-04-05 13:20:23 +02:00
glacambre
85706a4347
TSLint: re-enable radix rule 2019-04-05 13:16:04 +02:00
glacambre
0f5068f34c
TSLint: re-enable quotemark rule 2019-04-05 13:11:49 +02:00
glacambre
15e26d65a2
TSLint: re-enable prefer-promise-shorthand rule 2019-04-05 13:09:04 +02:00
glacambre
0e1ed199f3
TSLint: re-enable prefer-immediate-return rule 2019-04-05 13:05:37 +02:00
glacambre
2ac27b0b1d
TSLint: re-enable one-variable-per-declaration rule 2019-04-05 08:59:21 +02:00
glacambre
c5948c640d
TSLint: re-enable object-literal-shorthand rule 2019-04-04 13:30:11 +02:00
glacambre
8b3b809417
TSLint: re-enable no-useless-catch rule 2019-04-04 13:10:46 +02:00
glacambre
1b7c4f2052
TSLint: re-enable no-useless-cast rule 2019-04-04 07:09:44 +02:00
glacambre
b70832ef40
TSLint: re-enable no-unused-expression rule 2019-04-04 06:54:11 +02:00
glacambre
c03b483261
TSLint: re-enable no-unenclosed-multiline-block rule 2019-04-04 06:47:14 +02:00
glacambre
8f77bdc0fe
TSLint: re-enable no-try-promise rule 2019-04-04 06:41:25 +02:00
glacambre
fd09bd6c1d
TSLint: re-enable no-string-literal rule 2019-04-03 19:09:49 +02:00
glacambre
600a324941
TSLint: re-enable no-self-assignment rule 2019-04-03 18:34:19 +02:00
glacambre
0734798c45
TSLint: re-enable no-misleading-array-reverse rule
The no-misleading-array-reverse rule prevents using .sort() and
.reverse() in chains because this make these calls look like they return
a new sorted/reversed slice. But the truth is, these functions modify
the array in place and return that same array, which could cause quite a
lot of confusion if you don't expect that.
2019-04-03 18:27:50 +02:00
glacambre
e3c6c13573
TSLint: re-enable no-ignored-return rule 2019-04-03 18:16:59 +02:00
glacambre
5ae3f501a2
TSLint: re-enable no-small-switch rule 2019-04-03 13:49:38 +02:00
glacambre
8716fcaba3
TSLint: re-enable no-redundant-jump rule 2019-04-03 13:41:26 +02:00
glacambre
94a6f240ea
TSLint: re-enable no-redundant-boolean rule 2019-04-03 13:38:55 +02:00
glacambre
a943081f3b
TSLint: re-enable no-nested-template-literals rule 2019-04-03 13:33:03 +02:00
glacambre
270a1dbf9c
TSLint: re-enable no-dead-store rule
No point in storing things that we're not going to use.
2019-04-03 07:45:09 +02:00
glacambre
7240444d9a
TSLint: re-enable no-consecutive-blank-lines rule
Deactivated in excmds.ts as it is used to generate
.excmds_{background,content}.generated.ts which are full of consecutive
blank lines.
2019-04-03 07:17:48 +02:00
glacambre
15b627c340
TSLint: re-enable no-collapsible-if rule
This rule detects unnecessary nesting of if/else statements and tells
you to remove them.
2019-04-03 07:03:03 +02:00
glacambre
cb7c5f2932
TSLint: re-enable no-bitwise rule
Bitwise operations can be confusing so let's not use them.
2019-04-03 06:55:37 +02:00
glacambre
9119944bd9
TSLint: re-enable no-angle-bracket-type-assertion rule
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.
2019-04-03 06:33:13 +02:00
glacambre
673bf6f280
TSLint: re-enable member-ordering rule
The member-ordering rule enforces declaring public functions before
private functions.
2019-04-02 18:37:02 +02:00
glacambre
f8419b20ed
TSLint: re-enable interface-over-type-literal rule
The interface-over-type-literal rule specifies that object types should
be represented with `interface` instead of `type` if possible.
2019-04-02 18:22:54 +02:00
glacambre
3c9c3867e2
TSLint: re-enable forin rule
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.
2019-04-02 18:17:12 +02:00
glacambre
8545efdf3f
TSLint: re-enable comment-format rule
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.
2019-04-02 06:38:59 +02:00
glacambre
f2630ea047
TSLint: re-enable callable-types rule
This rule specifies that if an interface defines a simple function, it
should be represented as a `type` rather than an `interface`.
2019-04-02 06:16:00 +02:00
glacambre
f11f5481e2
TSLint: re-enable bool-param-default rule
The bool-param-default rule requires all optional boolean parameters to
have a default value.
2019-04-01 18:06:13 +02:00
glacambre
8ed07362e0
TSLint: re-enable ban-types rule
This rule disallows using Number, String or Boolean constructors as
types and instead forces using the actual type, `number`, `string` or
`boolean`.
2019-04-01 12:57:19 +02:00
glacambre
f5563c3d3e
TSLint: re-activate array-type rule
This rule stipulates that complex array types should be represented as
Array<T> rather than T[].
2019-04-01 05:28:21 +02:00
glacambre
d36eedf05b
Add tslint and sonarts to Travis
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.
2019-03-31 16:08:31 +02:00