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
no-object-mutation does not respect the prefix setting #136
Comments
Thanks for the issue. |
I've just had a quick look at this but I haven't been able to reproduce the old behaviour you mention. What version of I don't thing the "ignore-prefix" option was ever setup to allow this. For now I'm going to remove the bug label and add the enhancement label (as there should be a way to get your desired effect). |
@RebeccaStevens Thank you for taking the time to get back to me. The bad news is, I don't have access to the original package anymore ( I would still love to see it as an option though! |
Closed via #137 |
Hello and thank you for your work.
Context
In React, it's common to assign
defaultProps
via direct property assignment.Adding defaults this way make sense for two reasons:
LibraryManagedAttributes
that should automagically improve type inference if you assigndefaultProps
the traditional wayThe problem
I used to use this setting:
And it worked fine — assignment to any property called
defaultProps
was allowed. However, intslint-immutable@5.5.2
such an assignment triggers an error.It's impractical to whitelist every possible component name in your application:
So respecting the setting (just like it used to be) seems like the way to go.
The text was updated successfully, but these errors were encountered: