Skip to content

forEach missing in props validation #497

Closed
@inian

Description

@inian

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,
    })
  ),
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions