Closed
Description
Is there an existing issue for this?
- I have searched the existing issues and my issue is unique
- My issue appears in the command-line and not only in the text editor
Description Overview
<Item dataKey="key"/>
react/no-unknown-property: [2, requireDataLowercase: true}]
Raises false positive:
React does not recognize data-* props with uppercase characters on a DOM element. Found 'dataKey', use 'datakey' instead
Expected Behavior
No error because dataKey
doesn't start with data-
. The rule docs specifically mentions that it's only checking data-*
attributes, e.g. with the -
.
eslint-plugin-react version
v7.34.0
eslint version
v8.57.0
node version
v21.7.1