You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
There was an #3395 issue raised, which resulted in the rule being updated to support passing data-* attributes with any casing, but even the sandbox the reporter provided included a warning from react: "Warning: React does not recognize the data-testID prop on a DOM element.". This is still an issue right now with react 18, as seen in this sandbox.
OK, so to clarify, even though browsers allow almost anything after data-, react only allows lowercased data attributes?
Changing the sandbox to a few other react versions indicates this warning exists in at least React 16+ (changing it to v15 or lower got annoying, so i gave up).
We'll need to add this as a new option to warn on.
Do you think this should hide behind an option to no-unknown-property, so that by default we would ignore data-* uppercase attributes, but could enable the check?
Is there an existing issue for this?
Description Overview
There was an #3395 issue raised, which resulted in the rule being updated to support passing data-* attributes with any casing, but even the sandbox the reporter provided included a warning from react: "Warning: React does not recognize the
data-testID
prop on a DOM element.". This is still an issue right now with react 18, as seen in this sandbox.https://codesandbox.io/s/adoring-robinson-2z75gh
Expected Behavior
Expected behaviour: data-* attributes are reported, when they have any capital letters.
Actual behaviour: data-* attributes with uppercase letters are not reported by rule, react dumps warnings into console.
eslint-plugin-react version
v7.33.2
eslint version
v8.51.0
node version
v20
The text was updated successfully, but these errors were encountered: