performance/useSolidForComponent
performance · since 2.0.0
{
"linter": {
"rules": {
"performance": {
"useSolidForComponent": "error"
}
}
}
}Enforce using Solid's <For /> component for mapping an array to JSX elements.
let Component = (props) => <ol>{props.data.map(d => <li>{d.text}</li>)}</ol>;let Component = (props) => <>{props.data.map(d => <li>{d.text}</li>)}</>;let Component = (props) => (
<ol>
{props.data.map((d) => (
<li key={d.id}>{d.text}</li>
))}
</ol>
);let Component = (props) => <ol><For each={props.data}>{d => <li>{d.text}</li>}</For></ol>;let abc = x.map(y => y + z);let Component = (props) => {
let abc = x.map(y => y + z);
return <div>Hello, world!</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.
performance/useSolidForComponent
performance · since 2.0.0
{
"linter": {
"rules": {
"performance": {
"useSolidForComponent": "error"
}
}
}
}Enforces naming conventions for React createContext, useId, and useRef.
Require Svelte stores to be created with an initial value.
Enforce that components are defined as functions and never as classes.
Enforce using fewer Tailwind utilities instead of multiple utilities that are functionally the same.
Require complete, statically written class names.