Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Unknown property 'precedence' found (react/no-unknown-property) #3827

Open
2 tasks done
acusti opened this issue Sep 19, 2024 · 0 comments · May be fixed by #3829
Open
2 tasks done

[Bug]: Unknown property 'precedence' found (react/no-unknown-property) #3827

acusti opened this issue Sep 19, 2024 · 0 comments · May be fixed by #3829
Labels

Comments

@acusti
Copy link

acusti commented Sep 19, 2024

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

react v19 introduces a new precedence string prop to the <link> and <style> elements, but the react/no-unknown-property rule doesn’t yet know about it and generates linting errors when used:

<>
    <link href="https://foo.bar" precedence="medium" rel="canonical" />
    <style href="unique-hash" precedence="anything">{` p { color: red; } `}</style>
</>

example error:

  211:39  error  Unknown property 'precedence' found  react/no-unknown-property

these occur when running my lint npm run script: "lint": "eslint .",

Expected Behavior

i expect the new precedence attribute to not be considered an “unknown” property

eslint-plugin-react version

v7.36.1

eslint version

v8.57.0

node version

v22.7.0

@acusti acusti added the bug label Sep 19, 2024
acusti added a commit to acusti/eslint-plugin-react that referenced this issue Oct 22, 2024
acusti added a commit to acusti/eslint-plugin-react that referenced this issue Oct 22, 2024
acusti added a commit to acusti/eslint-plugin-react that referenced this issue Oct 22, 2024
acusti added a commit to acusti/eslint-plugin-react that referenced this issue Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 participant