# useQwikLoaderLocation

Rule `biome/useQwikLoaderLocation`. Enforce that Qwik loader functions are declared in the correct location.

- Source: biome
- Technologies: Qwik
- Kind: correctness
- Needs type information: no
- Autofix: no
- Reach: 30.6M weekly downloads of presets that enable it
- Trend: +109.3% last quarter
- Rank: #600 by reach, #235 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `correctness/useQwikLoaderLocation` | yes | no | group correctness, since 2.4.11 | [docs](https://biomejs.dev/linter/rules/use-qwik-loader-location/) |

## Code examples

### Incorrect: the rule reports this

```jsx
// src/components/product.jsx
import { routeLoader$ } from '@builder.io/qwik-city';
export const useProducts = routeLoader$(async () => {});
```

```jsx
// src/routes/index.jsx
import { routeLoader$ } from '@builder.io/qwik-city';
export const getProducts = routeLoader$(async () => {});
```

```jsx
// src/routes/index.jsx
import { routeLoader$ } from '@builder.io/qwik-city';
const useProducts = routeLoader$(async () => {});
```

### Correct: the rule accepts this

```jsx
// src/routes/index.jsx
import { routeLoader$ } from '@builder.io/qwik-city';
export const useProducts = routeLoader$(async () => {});
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "correctness": {
        "useQwikLoaderLocation": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Biome recommended](https://lintradar.dev/presets/biome-recommended.md) | Biome | `@biomejs/biome` | 491 | 28.5M | +106.8% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |

## Related rules

- [biome/useQwikClasslist](https://lintradar.dev/rules/biome/useQwikClasslist.md): Prefer using the `class` prop as a classlist over the `classnames` helper.
- [biome/useQwikMethodUsage](https://lintradar.dev/rules/biome/useQwikMethodUsage.md): Disallow `use*` hooks outside of `component$` or other `use*` hooks in Qwik applications.
- [biome/usePlaywrightValidDescribeCallback](https://lintradar.dev/rules/biome/usePlaywrightValidDescribeCallback.md): Enforce valid `describe()` callback.
- [biome/useQwikValidLexicalScope](https://lintradar.dev/rules/biome/useQwikValidLexicalScope.md): Disallow unserializable expressions in Qwik dollar ($) scopes.
- [biome/usePackageJsonValidLicense](https://lintradar.dev/rules/biome/usePackageJsonValidLicense.md): Require the `license` field in `package.json` to be a valid license.
- [biome/useReactAsyncServerFunction](https://lintradar.dev/rules/biome/useReactAsyncServerFunction.md): Require functions with the "use server" directive to be async.

---

Web page: https://lintradar.dev/rules/biome/useQwikLoaderLocation. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
