tslint-immutable icon indicating copy to clipboard operation
tslint-immutable copied to clipboard

TSLint rules to disable mutation in TypeScript.

Results 18 tslint-immutable issues
Sort by recently updated
recently updated
newest added

This will be cool addition to https://github.com/jonaskello/tslint-immutable#no-mixed-interface or as standalone rule I think. Even better to allow functions only in interfaces and data only in type literals

transferred to eslint port

Using `Readonly` is much more readable than marking every property as `readonly`.

transferred to eslint port

See [Travis build](https://travis-ci.com/jonaskello/tslint-immutable/builds/116048100) for details.

bug

Within constructors, class member initialization and mutation seem to be treated as the same thing. Only initialization should be allowed. ```ts class Foo { readonly bar = 1; readonly baz:...

bug

Today we can ignore prefix on interface members using `readonly-keyword` with `ignore-prefix`. Sometimes (for performance reasons) I would like to create an interface where all members are mutable. In those...

new rule option

Are there any compile-time performance costs to have `readonly` everywhere? The whole project and idea sounds super legit to me, but I'm afraid to automatically convert my whole codebase to...

discussion

The point of `"ignore-local"` is that you still have a pure function, even if you have local state. But in `readonly-array`, even local interface definitions are ignored, even if they...

There is an escape hatch for mutable members of an interface by prefixing them. However this is not useful for indexer interfaces. So I propose to extend the prefix to...