Rules
no-implicit-key
Full Name in eslint-plugin-react-x
Full Name in @eslint-react/eslint-plugin
Features
๐งช
Presets
xrecommendedrecommended-typescriptrecommended-type-checked
Description
Prevents key from not being explicitly specified (e.g. spreading key from objects).
This makes it hard to see if the key was passed correctly to the element or where it came from.
And it's also be proposed to be deprecated is this RFC: Deprecate spreading key from objects.
Examples
Failing
Passing
Implementation
See Also
jsx-key-before-spread
Enforces that thekeyattribute is placed before the spread attribute in JSX elements.no-missing-key
Prevents missingkeyon items in list rendering.no-duplicate-key
Prevents duplicatekeyon elements in the same array or a list ofchildren.no-array-index-key
Warns when an arrayindexis used as akeyprop.