correctness/noReactPropAssignments
correctness · since 2.0.0
No autofix
biome.json
{
"linter": {
"rules": {
"correctness": {
"noReactPropAssignments": "error"
}
}
}
}function Foo(props) {
props.bar = "Hello " + props.bar;
return <div>{props.bar}</div>
}const Foo = function({bar}) {
bar = "Hello " + bar;
return <div>{bar}</div>
}Examples from the Biome documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
ESLint does not have this rule.
Oxlint does not have this rule.
correctness/noReactPropAssignments
correctness · since 2.0.0
{
"linter": {
"rules": {
"correctness": {
"noReactPropAssignments": "error"
}
}
}
}Replaces usages of forwardRef with passing ref as a prop.
Disallow dependencies that are known to have better alternatives.
Disallow pseudo-elements inside :is(), :where(), :not() and :has().