logoESLint React
Rules

jsx-no-duplicate-props

Full Name in eslint-plugin-react-x

react-x/jsx-no-duplicate-props

Full Name in @eslint-react/eslint-plugin

@eslint-react/jsx-no-duplicate-props

Presets

  • x
  • recommended

Description

Disallow duplicate props in JSX elements.

Examples

Failing

<Hello name="John" name="Doe" />;

Passing

<Hello name="John" />;

Implementation


See Also

  • jsx-no-undef
    Prevents using variables in JSX that are not defined in the scope.
  • jsx-uses-vars
    Marks variables used in JSX elements as used.
  • jsx-uses-react
    Marks React variables as used when JSX is used.

On this page