Disallow hard-code the id attribute

Warn it hard-coded the value of the id attribute when the element is a fragment.

Rule Details

👎 Examples of incorrect code for this rule

<div id="foo"></div>

👍 Examples of correct code for this rule

const id = uid();
<div id={id}></div>;
const Component = ({ id }) => <div id={id}></div>;


  • Type: boolean
  • Deafult Value: true

Default severity