4 ms·
Nice plugin to make sure you never mutate: https://github.com/jonaskello/tslint-immutable/tree/master/test/rules/no-object-mutation https://github.com/jonaskell
by ht85 7y ago
Nice plugin to make sure you never mutate: https://github.com/jonaskello/tslint-immutable/tree/master/test/rules/no-object-mutation https://github.com/jonaskello/tslint-immutable/tree/master/t...
You can add a rule based on the name of the variable to allow mutating (e.g. naming it `mutableSomething`)
- _bxg1 7y agoInteresting, but not really tractable if you have to manually add every single variable to the rules config.
- chaorace 7y agoThe plugin allows pattern-based exceptions. For example, if your rule excluded variables with a "mutable" prefix, you could name your variable mutableSomething and it will be automatically ignored by the linter