nursery/useReactCompiler
nursery · since 2.5.8
No autofix
biome.json
{
"linter": {
"rules": {
"nursery": {
"useReactCompiler": "error"
}
}
}
}import { useState } from "react";
function Component(props) {
if (props.enabled) {
useState(0);
}
return <div />;
}function Component(props) {
return <div>{props.value}</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.
nursery/useReactCompiler
nursery · since 2.5.8
{
"linter": {
"rules": {
"nursery": {
"useReactCompiler": "error"
}
}
}
}Enforce that components are defined as functions and never as classes.
Enforces naming conventions for React createContext, useId, and useRef.
Enforce using Solid's <For /> component for mapping an array to JSX elements.