Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow reassigment for variables #15

Open
steida opened this issue Nov 13, 2016 · 2 comments
Open

allow reassigment for variables #15

steida opened this issue Nov 13, 2016 · 2 comments

Comments

@steida
Copy link

steida commented Nov 13, 2016

I can't enforce variables reassignment for actual project, but I can enforce it on object. It is possible to turn-off variables reassignment somehow?

@jfmengels
Copy link
Owner

jfmengels commented Nov 14, 2016

You can turn off the fp/no-mutation rule. Apart from that, no. Maybe if you give me some more information about your use-case, I could add options to the rule or create a new one, but I'm not sure that's wanted. Depends on your use-case really.

@steida
Copy link
Author

steida commented Nov 14, 2016

Sure! My use case is simple. I was using immutable.js, but serialization and deserialization suck, so I replaced it with plain objects and Ramda. Some people are using Object.freeze during development to prevent accidental object change. I think it's up to eslint to enforce such rule. The problem with current settings is, that people override variables a lot, but almost never mutate objects, because all these spread notations. What I need for https://github.com/este/este is the rule, which replaces these hacks https://github.com/rtfeldman/seamless-immutable#performance, but allow variable reassignment. Does it makes sense?

https://twitter.com/steida/status/797947649831878656

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants