tslint-consistent-codestyle icon indicating copy to clipboard operation
tslint-consistent-codestyle copied to clipboard

Collection of awesome rules to extend TSLint

Results 33 tslint-consistent-codestyle issues
Sort by recently updated
recently updated
newest added
trafficstars

We have a pre-commit hook that runs `tslint --fix`, but with a recent update of this plugin that does auto-fixing for `no-unnecessary-else`, it generates *really* strange code, most likely because...

enhancement
help wanted

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...

feature request

> Enums that are exported or available in the global scope are ignored. In https://github.com/ajafff/tslint-consistent-codestyle/blob/master/docs/prefer-const-enum.md, not sure why this restriction is in place?

enhancement

```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...

bug

What do you think of adding a new selector to the naming-convention rule which applies to variables that are containing a construct signature? With the current selectors I cannot target...

enhancement
revisit
breaking change

```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 =...