-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
forbid-foreign-prop-types should allow another component's propTypes in a propTypes definition #1647
Comments
I think that by default, it definitely should warn on it; however, I'd be open to adding an option that explicitly allowed this case. |
Something like |
Also, how do you feel about softening the error message a bit? |
I wouldn't call it "softening"; just making it more accurate :-) but yes, I'm also open to that. For an option name, |
Sounds good to me. I'll work on implementing this change. |
Currently this results in a warning but shouldn't:
The error message could also be improved to explain why using another component's propTypes is bad. For example: "Using propTypes from another component is not safe because they may be removed in production builds".
Comments via @gaearon on this issue: facebook/create-react-app#3818
The text was updated successfully, but these errors were encountered: