Rules
ensure-forward-ref-using-ref
Full Name in eslint-plugin-react-x
Full Name in @eslint-react/eslint-plugin
Features
🔍
Presets
corerecommendedrecommended-typescriptrecommended-type-checked
What it does
Requires that components wrapped with forwardRef must have a ref parameter.
This rule checks all React components using forwardRef and verifies that there is a second parameter.
Omitting the ref argument is usually a bug, and components not using ref don't need to be wrapped by forwardRef.