# useSvelteKitResolve

Rule `biome/useSvelteKitResolve`. Require internal navigation in SvelteKit apps to use paths built with `resolve()`.

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

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `nursery/useSvelteKitResolve` | yes | no | group nursery, since 2.6.0 | [docs](https://biomejs.dev/linter/rules/use-svelte-kit-resolve/) |

## Code examples

### Incorrect: the rule reports this

```js
import { goto } from "$app/navigation";

goto("/foo");
```

```js
import { goto } from "$app/navigation";
import { resolve } from "$app/paths";

goto(resolve("/foo") + "/bar");
```

```js
import { pushState } from "$app/navigation";

pushState("/foo", {});
```

### Correct: the rule accepts this

```js
import { goto, pushState, replaceState } from "$app/navigation";
import { resolve } from "$app/paths";

goto(resolve("/foo"));
pushState(resolve("/foo"), {});
replaceState(resolve("/foo"), {});

// Shallow routing
pushState("", {});
replaceState("", {});
```

```ts
import { goto } from "$app/navigation";
import type { ResolvedPathname } from "$app/types";

function navigate(path: ResolvedPathname) {
    goto(path);
}
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "useSvelteKitResolve": "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/useSvelteEventDispatcherTypes](https://lintradar.dev/rules/biome/useSvelteEventDispatcherTypes.md): Require `createEventDispatcher` calls to declare the types of their events.
- [biome/useSvelteKitRuneImports](https://lintradar.dev/rules/biome/useSvelteKitRuneImports.md): Require importing SvelteKit's app state from `$app/state` instead of `$app/stores`.
- [biome/useSimpleNumberKeys](https://lintradar.dev/rules/biome/useSimpleNumberKeys.md): Disallow number literal object member names which are not base 10 or use underscore as separator.
- [biome/useSvelteReactiveClasses](https://lintradar.dev/rules/biome/useSvelteReactiveClasses.md): Require the reactive classes from `svelte/reactivity` instead of built-in objects that are modified.
- [biome/useReactNativeValidPlatformColors](https://lintradar.dev/rules/biome/useReactNativeValidPlatformColors.md): Require `PlatformColor()` and `DynamicColorIOS()` calls to use values written directly in the call.
- [biome/useSvelteRequireEachKey](https://lintradar.dev/rules/biome/useSvelteRequireEachKey.md): Require keyed `{#each}` blocks in Svelte templates.

---

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