react/forbid-component-props
eslint-plugin-react
No autofix
eslint.config.js
import react from "eslint-plugin-react";
export default [
{
plugins: { react },
rules: {
"react/forbid-component-props": "error",
},
},
];<Hello className='foo' /><Hello style={{color: 'red'}} /><Hello name='Joe' /><div className='foo' /><div style={{color: 'red'}} />Examples from the ESLint 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.
react/forbid-component-props
eslint-plugin-react
import react from "eslint-plugin-react";
export default [
{
plugins: { react },
rules: {
"react/forbid-component-props": "error",
},
},
];react/forbid-component-props
react plugin · restriction
{
"plugins": [
"react"
],
"rules": {
"react/forbid-component-props": "error"
}
}Biome does not have this rule.
Enforce using onChange or readonly attribute when checked is used
Require all forwardRef components include a ref parameter
Ensure destructuring and symmetric naming of useState hook value and setter variables