Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 652 Bytes

jsx-no-duplicate-props.md

File metadata and controls

33 lines (21 loc) · 652 Bytes

Prevent duplicate properties in JSX (jsx-no-duplicate-props)

Creating JSX elements with duplicate props can cause unexpected behavior in your application.

Rule Details

The following patterns are considered warnings:

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

The following patterns are not considered warnings:

<Hello firstname="John" lastname="Doe" />;

Rule Options

...
"jsx-no-duplicate-props": [<enabled>, { "ignoreCase": <boolean> }]
...

ignoreCase

When true the rule ignores the case of the props. Default to false.

When Not To Use It

If you are not using JSX then you can disable this rule.