jsx-eslint/eslint-plugin-react

no-array-index-key not triggered when spreading props

Open

#1,625 创建于 2017年12月24日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)JavaScript (2,797 fork)batch import
enhancementhelp wanted

仓库指标

Star
 (8,630 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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.

贡献者指南