suspicious/noReactForwardRef
suspicious · since 2.2.5
Unsafe autofix
biome.json
{
"linter": {
"rules": {
"suspicious": {
"noReactForwardRef": "error"
}
}
}
}import { forwardRef } from "react";
const MyInput = forwardRef(function MyInput(props, ref) {
return <input ref={ref} {...props} />;
});import { forwardRef } from "react";
const MyInput = forwardRef((props, ref) => {
return <input ref={ref} {...props} />;
});function MyInput({ ref, ...props }) {
return <input ref={ref} {...props} />;
}const MyInput = ({ ref, ...props }) => {
return <input ref={ref} {...props} />;
}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.
suspicious/noReactForwardRef
suspicious · since 2.2.5
{
"linter": {
"rules": {
"suspicious": {
"noReactForwardRef": "error"
}
}
}
}Disallow pseudo-elements inside :is(), :where(), :not() and :has().