deno.com

jsx-no-duplicate-props

NOTE: this rule is included the following rule sets:recommendedreactjsxfresh
Enable full set in deno.json:
{
  "lint": {
    "tags": ["recommended"] // ...or "react", "jsx", "fresh"
  }
}
Enable full set using the Deno CLI:
deno lint --tags=recommended
# or ...
deno lint --tags=react
# or ...
deno lint --tags=jsx
# or ...
deno lint --tags=fresh

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 />

Did you find what you needed?

Privacy policy