-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
immutable-data
: Map Support
#934
Comments
We don't currently have map and set support in this rule. In the meantime, assuming you are using TypeScript, I would recommend a export const value: ReadonlyMap<string, string> = new Map();
value.set('foo', 'bar'); // error. |
Thank you. I think that's fine to not support this for vanilla js; and yes, set support would be amazing too. |
BREAKING CHANGE: map and set mutations will now be reported fix #934
🎉 This issue has been resolved in version 9.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@RebeccaStevens : I have no words, this is awesome 🫶 Thank you so much! |
Suggestion
Thank you for this amazing linter, this has helped us keep our codebase maintainable and our data flows easy to understand! I have a request: currently
immutable-data
supports array and disallows modifications. When it comes to other similar datatypes like Maps, the linter doesn't seem to have rules that prevent modifications.Example with
immutable-data
set toerror
:If I missed it, can you please point me in the right direction? Thank you!
The text was updated successfully, but these errors were encountered: