Klaus Meinhardt
Klaus Meinhardt
The docs could really use some love. - [x] rephrase stuff - [x] add code samples - [x] add config examples - [x] create a documentation page for each rule...
```ts type Values = T extends {[K in keyof T]: infer U} ? U : never; ``` `U` is marked as unused but is actually referenced in the then branch...
Useless blocks * don't have a label * are contained in other block-like Nodes * excludes block as children of IterationStatement, IfStatement, WithStatement, TryStatement, ArrowFunction * maybe exclude blocks in...
```ts const map: Map = new Map(); // could be rewritten as const map = new Map(); // but consider a scenario with type aliases type DisableMap = Map; const...
```ts let foo: Array = [ ['a', true], ['b', false], ]; ```
Once typescript adds the ability to use literal typed constants as initializer in const enums, `prefer-const-enum` should try to handle this as well.
Should be easy to implement. Some things to consider: ```ts function f() { var a = foo(), b = bar(a, a); return b; } function f() { var a =...
Possible options: * `"no-or"` to exempt if statements that have a logical OR in their condition * `"complexity": number` threshold similar to `cyclomatic-complexity`