Is there an existing issue for this?
Description Overview
When using a custom array mapping function like lodash.map
, the jsx-key
rule won't be triggered
import map from 'lodash/map';
// not triggered
const Comp1 = () => {
return map([1, 2, 3], (item) => {
return <div>{item}</div>;
});
};
// triggered
const Comp2 = () => {
return [1, 2, 3].map((item) => {
return <div>{item}</div>;
});
};
Expected Behavior
Is it possible to add a config to support custom mapping function?
eslint-plugin-react version
v7.32.2
eslint version
v8.35.0
node version
v18.14.0