nursery/useReactNamingConvention
nursery · since 2.5.12
No autofix
biome.json
{
"linter": {
"rules": {
"nursery": {
"useReactNamingConvention": "error"
}
}
}
}Enforces naming conventions for React createContext, useId, and useRef.
import { createContext } from "react";
const theme = createContext("");import { useId } from "react";
const randomString = useId();import { useRef } from "react";
const node = useRef(null);import { createContext } from "react";
const ThemeContext = createContext("");import { useId } from "react";
const myId = useId();import { useRef } from "react";
const myRef = useRef(null);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/useReactNamingConvention
nursery · since 2.5.12
{
"linter": {
"rules": {
"nursery": {
"useReactNamingConvention": "error"
}
}
}
}Enforce that components are defined as functions and never as classes.
Enforce using Solid's <For /> component for mapping an array to JSX elements.
Require Svelte stores to be created with an initial value.
Enforce using fewer Tailwind utilities instead of multiple utilities that are functionally the same.