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
Add explicit exceptions to no-extend-native
and no-native-reassign
#2355
Comments
I had the same problem and did disable the rule for each individual exception. The ability to specify explicit exception would be a helpful addition. |
Possibly, do you have an idea about how it should be implemented? What would you expect to specify as exceptions? |
I imagined that the rule could offer an array of object names that are allowed to have their prototypes modified. |
Exactly that - like |
What about only using the object name? |
That would be fine too, since it appears the rule only covers |
Yeah, I think just the constructor name makes the most sense. |
Thanks! |
I can certainly disable these rules when desired, but I'd prefer to enable the rule, and supply explicit exceptions. A specific example: in https://github.com/es-shims/RegExp.prototype.flags , I'd like to allow
no-extend-native
ofRegExp.prototype
only.Is this something you'd be open to adding?
The text was updated successfully, but these errors were encountered: