Skip to content

linter: Add missing config options in react/jsx-key rule #15615

@connorshea

Description

@connorshea

Currently, the jsx-key rule does not support configuration options from jsx-key, which results in lint failures due to some config options defaulting to different values than what the oxlint rule supports.

See https://github.com/jsx-eslint/eslint-plugin-react/blob/f2869fd6dc76ceb863c5e2aeea8bf4d392508775/docs/rules/jsx-key.md

oxlint rule source: https://github.com/oxc-project/oxc/blob/78c38978b7b8137d7910e8679815bc32e008b4f5/crates/oxc_linter/src/rules/react/jsx_key.rs

The missing config options are these, they all default to false:

  • checkFragmentShorthand
  • checkKeyMustBeforeSpread
  • warnOnDuplicates

These are necessary to easily migrate from the eslint react plugin to oxlint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions