Skip to content

add a rule that recommends alternatives to vague prop types #224

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

Closed
wants to merge 0 commits into from
Closed

add a rule that recommends alternatives to vague prop types #224

wants to merge 0 commits into from

Conversation

pwmckenna
Copy link
Contributor

not super tied to the rule name, or the way options are passed in. here's the goal of the rule:

I don't ever want people in my repo using React.PropTypes.any/array/object because they could easily be replaced by other proptypes like shape/arrayOf that document the structure of the data better. Whether this rule checks for vagueness, or just allows for blacklisting of types, doesn't really matter to me. Thoughts?

Edit: Looks like this has already been suggested. Probably should have done a little browsing before hand: #215

@jimbolla
Copy link

I would do "forbid-proptypes" and then make the rule customizable so that the user can specificy any proptypes they want to exclude, but make the defaults any/array/object.

@pwmckenna pwmckenna closed this Sep 22, 2015
@pwmckenna pwmckenna deleted the vague-prop-types branch September 22, 2015 17:32
@pwmckenna
Copy link
Contributor Author

good suggestion! #225

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants