Eslint-plugin-react: react/prop-types: Prop validation in Array.map

Created on 18 Oct 2019  路  2Comments  路  Source: yannickcr/eslint-plugin-react

image

In this piece of code above the eslint is warning that the id and name are missing in the props validation. But this is a destructor in a map function. I think that this is a bug, right?

Versions:

eslint: 6.5.1
eslint-plugin-react: 7.16.0
bug help wanted

All 2 comments

Our component detection is seeing a function that takes props and returns jsx; however it's clear that this use case shouldn't be detected as a component.

This is working fine for me with versions:

eslint: ^7.3.1
eslint-plugin-react: ^7.20.2
Was this page helpful?
0 / 5 - 0 ratings