correctness/useQwikLoaderLocation
correctness · since 2.4.11
No autofixRecommended
biome.json
{
"linter": {
"rules": {
"correctness": {
"useQwikLoaderLocation": "error"
}
}
}
}Enforce that Qwik loader functions are declared in the correct location.
// src/components/product.jsx
import { routeLoader$ } from '@builder.io/qwik-city';
export const useProducts = routeLoader$(async () => {});// src/routes/index.jsx
import { routeLoader$ } from '@builder.io/qwik-city';
export const getProducts = routeLoader$(async () => {});// src/routes/index.jsx
import { routeLoader$ } from '@builder.io/qwik-city';
const useProducts = routeLoader$(async () => {});// src/routes/index.jsx
import { routeLoader$ } from '@builder.io/qwik-city';
export const useProducts = routeLoader$(async () => {});Examples from the Biome documentation.
ESLint does not have this rule.
Oxlint does not have this rule.
correctness/useQwikLoaderLocation
correctness · since 2.4.11
{
"linter": {
"rules": {
"correctness": {
"useQwikLoaderLocation": "error"
}
}
}
}Prefer using the class prop as a classlist over the classnames helper.
Disallow use* hooks outside of component$ or other use* hooks in Qwik applications.
Enforce valid describe() callback.
Disallow unserializable expressions in Qwik dollar ($) scopes.
Require the license field in package.json to be a valid license.
Require functions with the "use server" directive to be async.