Skip to content

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

Open

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions