noDuplicateJsxProps
此内容尚不支持你的语言。
Diagnostic Category: lint/suspicious/noDuplicateJsxProps
Since: v1.0.0
Sources:
- Same as:
react/jsx-no-duplicate-props
Prevents JSX properties to be assigned multiple times.
Examples
Section titled ExamplesInvalid
Section titled Invalidcode-block.jsx:1:8 lint/suspicious/noDuplicateJsxProps ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ This JSX property is assigned multiple times.
> 1 │ <Hello name=“John” name=“John” />
│ ^^^^^^^^^^^
2 │
ℹ This attribute is assigned again here.
> 1 │ <Hello name=“John” name=“John” />
│ ^^^^^^^^^^^
2 │
code-block.jsx:1:8 lint/suspicious/noDuplicateJsxProps ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ This JSX property is assigned multiple times.
> 1 │ <label xml:lang
=“en-US” xml:lang
=“en-US”></label>
│ ^^^^^^^^^^^^^^^^
2 │
ℹ This attribute is assigned again here.
> 1 │ <label xml:lang
=“en-US” xml:lang
=“en-US”></label>
│ ^^^^^^^^^^^^^^^^
2 │