Open
Description
I noticed that after refactorings we sometimes forgot to remove the key
on the root fragment of a new component, this seems to be entirely redundant and just add overhead.
example:
const Component: FC = () => {
// v key is redundant here
return <p key={1}>test</test>;
}
This would be effectively the counter-rule to `https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-key
I think a good heuristic would be to match any fragment that is not contained within a callback eg. Array.map
.
Metadata
Assignees
Labels
No labels