-
Notifications
You must be signed in to change notification settings - Fork 0
Add eslint-plugin-immutable rules #7
Comments
I think it's too early for this. Also what about mutating in self contained functions? E.g. reducers? But interesting way to be immutable without library overhead. |
You can always disable rules per line if you know what you're doing (like Why's this too early? Because of the plugin's maturity or something else? |
E.g. this should do the trick const arrIndex = arr.reduce((index, d) => {
index[d.id] = d; //eslint-disable-line no-mutation
return index;
}, {}); |
Yeah plugin maturity and I'd like to see how it works in real applications. I'm aware that I can disable it on a line, file and project basis ;-) I do like it conceptional. But it is a major step to say we write everything immutably by default. I'd like to see how big the impact is on a average data visualization component where we're not just using react. |
Does the plugin detect mutation through functions? e.g. On Thu, Mar 10, 2016 at 12:29 PM Thomas Preusse [email protected]
|
At least the
no-mutation
rule looks quite useful.https://github.com/jhusain/eslint-plugin-immutable
The text was updated successfully, but these errors were encountered: