jsx-eslint/eslint-plugin-react
Ver no GitHubno-array-index-key not triggered when spreading props
Open
#1.625 aberto em 24 de dez. de 2017
enhancementhelp wanted
Métricas do repositório
- Stars
- (8.630 stars)
- Métricas de merge de PR
- (Nenhuma PRs mesclada em 30d)
Description
There's no warning or error when doing something like this:
people.map(({ name, email }, key) => {
const props = {
key,
name,
email,
};
return <Person {...props} />;
});
I realize this is a bit of an edge case, but maybe we can find a way to catch these uses as well.