correctness/useReactAsyncServerFunction
correctness · since 2.4.12
Unsafe autofixRecommended
biome.json
{
"linter": {
"rules": {
"correctness": {
"useReactAsyncServerFunction": "error"
}
}
}
}Require functions with the "use server" directive to be async.
<form
action={() => {
'use server';
// ...
}}
>
// ...
</form>function serverFunction() {
'use server';
// ...
}'use server';
export function serverFunction() {
// ...
}<form
action={async () => {
'use server';
// ...
}}
>
// ...
</form>async function serverFunction() {
'use server';
// ...
}'use server';
export async function serverFunction() {
// ...
}Examples from the Biome documentation.
ESLint does not have this rule.
Oxlint does not have this rule.
correctness/useReactAsyncServerFunction
correctness · since 2.4.12
{
"linter": {
"rules": {
"correctness": {
"useReactAsyncServerFunction": "error"
}
}
}
}Disallow unserializable expressions in Qwik dollar ($) scopes.
Ensure that platform-specific React Native components are only imported in files named for that platform.
Disallow use* hooks outside of component$ or other use* hooks in Qwik applications.
Require PlatformColor() and DynamicColorIOS() calls to use values written directly in the call.
Enforce that Qwik loader functions are declared in the correct location.
Disallow number literal object member names which are not base 10 or use underscore as separator.