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

react/forbid-prop-types is not allowing arrays & objects #1952

Closed
321ckatz123 opened this issue Nov 5, 2018 · 3 comments
Closed

react/forbid-prop-types is not allowing arrays & objects #1952

321ckatz123 opened this issue Nov 5, 2018 · 3 comments

Comments

@321ckatz123
Copy link

The react/forbid-prod-types lint rule forbids using arrays & objects (this is also the default), but no mention of it is in the README as to which policy it is breaking (granted, I assume it is because you should be explicit about what the array or object contains, using arrayOf and shape respectively).

@ljharb
Copy link
Collaborator

ljharb commented Nov 5, 2018

We have a number of rules in the config that aren't mentioned in the guide, and vice versa.

Indeed, the reason is because you should be explicit about what the array or object contains. A PR to add a section would be appreciated!

@rahilvora
Copy link

#1984 PR for this issue. @ljharb Kindly review it.

@ljharb
Copy link
Collaborator

ljharb commented Jan 7, 2019

Fixed by #1984.

@ljharb ljharb closed this as completed Jan 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants