We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Plugin version - 4.2.1 forEach is considered as a prop that I need to validate instead of being recognised as an inbuilt function. Sample code below
import React, { PropTypes } from 'react'; function JobList(props) { const jobs = []; props .jobs .forEach(() => {}); // error here saying 'forEach missing in props validation' return ( <div></div> ); } JobList.propTypes = { jobs: PropTypes.arrayOf( PropTypes.shape({ id: PropTypes.string.isRequired, }) ), };
The text was updated successfully, but these errors were encountered:
Same thing for .map just fyi
.map
Sorry, something went wrong.
Seems like any propType that is annotated as array or arrayOf should ignore all of the Array.prototype methods.
propType
array
arrayOf
Array.prototype
They are already ignored, but I seems there is a bug with line-breaks.
props .jobs .forEach(() => {}); // forEach missing in props validation props.jobs.forEach(() => {}); // No warning
2884a80
No branches or pull requests
Plugin version - 4.2.1
forEach is considered as a prop that I need to validate instead of being recognised as an inbuilt function.
Sample code below
The text was updated successfully, but these errors were encountered: