jsx-no-duplicate-props
NOTE: this rule is included the following rule sets:
recommendedreactjsxEnable full set in
deno.json:{
"lint": {
"rules": {
"tags": ["recommended"] // ...or "react", "jsx"
}
}
}Enable full set using the Deno CLI:
deno lint --rules-tags=recommended # or ... deno lint --rules-tags=react # or ... deno lint --rules-tags=jsx
This rule can be explictly included to or excluded from the rules present in the current tag by adding it to the
include or exclude array in deno.json:{
"lint": {
"rules": {
"include": ["jsx-no-duplicate-props"],
"exclude": ["jsx-no-duplicate-props"]
}
}
}Disallow duplicated JSX props. Later props will always overwrite earlier props often leading to unexpected results.
Invalid:
<div id="1" id="2" />;
<App a a />;
<App a {...b} a />;
Valid:
<div id="1" />
<App a />
<App a {...b} />
<App {...b} b />