correctness/useQwikValidLexicalScope
correctness · since 2.2.6
No autofixRecommended
biome.json
{
"linter": {
"rules": {
"correctness": {
"useQwikValidLexicalScope": "error"
}
}
}
}// Arrow function assigned without wrapping it in $(...)
const handleClick = () => {
console.log("clicked");
};const handleClick = $(() => {
// Valid: only using serializable variables or props
console.log("clicked");
});Examples from the Biome documentation.
ESLint does not have this rule.
Oxlint does not have this rule.
correctness/useQwikValidLexicalScope
correctness · since 2.2.6
{
"linter": {
"rules": {
"correctness": {
"useQwikValidLexicalScope": "error"
}
}
}
}Disallow use* hooks outside of component$ or other use* hooks in Qwik applications.
Require functions with the "use server" directive to be async.
Enforce that Qwik loader functions are declared in the correct location.
Ensure that platform-specific React Native components are only imported in files named for that platform.
Prefer using the class prop as a classlist over the classnames helper.
Require PlatformColor() and DynamicColorIOS() calls to use values written directly in the call.