src/content/docs/linter/rules/no-duplicate-jsx-props.mdx
import { Tabs, TabItem } from '@astrojs/starlight/components';
<Tabs> <TabItem label="JSX and TSX" icon="seti:javascript"> ## Summary - Rule available since: `v1.0.0` - Diagnostic Category: [`lint/suspicious/noDuplicateJsxProps`](/reference/diagnostics#diagnostic-category) - This rule is **recommended**, meaning it is enabled by default. - This rule doesn't have a fix. - The default severity of this rule is [**error**](/reference/diagnostics#error). - Sources: - Same as [`react/jsx-no-duplicate-props`](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md){
"linter": {
"rules": {
"suspicious": {
"noDuplicateJsxProps": "error"
}
}
}
}
Prevents JSX properties to be assigned multiple times.
<Hello name="John" name="John" />
<label xml:lang="en-US" xml:lang="en-US"></label>
<Hello firstname="John" lastname="Doe" />
<label xml:lang="en-US" lang="en-US"></label>