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
Overhaul of ignore-prefix #137
Conversation
A bit more testing is probably needed before merging this. |
Nice! This will fix two of my scenarios. |
Looks good to me! I think there is a fair amount of tests included too. |
I decide to go ahead and release this as is. Hopefully any bugs found from now on will be easy fixes. |
Thank you! Just a side note: I believe the example should say: -"no-object-mutation": [true, { "ignore-pattern": "**.defaultProps.*" }]
+"no-object-mutation": [true, { "ignore-pattern": "**.defaultProps*" }], because there is no dot when you do |
Fixes #101, #114, #136
ignore-prefix has been re-implement.
In the new implementation, only the name is tested against. So for example, only
foo
would be tested against for the following code.New rule options
Issue Fixes
#101
Allow array mutation on arrays that start with the name "mutable", regardless of how deep they are.
#114
ignore-pattern can essentially be used as ignore-exact.
#136
Allow object mutation on objects called "defaultProps", regardless of how deep they are.