Skip to content
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

How can I inherit propTypes #200

Closed
bartvde opened this issue Aug 28, 2015 · 2 comments
Closed

How can I inherit propTypes #200

bartvde opened this issue Aug 28, 2015 · 2 comments

Comments

@bartvde
Copy link

bartvde commented Aug 28, 2015

I'm getting errors such as: 11:15 warning 'map' is missing in props validation for Select react/prop-types

in cases where I have inheritance:

export default class Select extends MapTool ....
MapTool.propTypes = {
  map: React.PropTypes.instanceOf(ol.Map).isRequired,
  toggleGroup: React.PropTypes.string
};

How can I overcome this without having to redeclare all the propTypes from the base class?

@yannickcr
Copy link
Member

Similar to #68 and #106 but I do not have any real solution for this case right now (beside disabling the react/prop-types rule for this class).

@bartvde
Copy link
Author

bartvde commented Sep 7, 2015

Okay, thanks for the feedback. I'll do just that for now.

@bartvde bartvde closed this as completed Sep 7, 2015
@jsx-eslint jsx-eslint deleted a comment from collinalexbell Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants