nursery/useSvelteKitRuneImports
nursery · since 2.5.15
No autofixRecommended
biome.json
{
"linter": {
"rules": {
"nursery": {
"useSvelteKitRuneImports": "error"
}
}
}
}Require importing SvelteKit's app state from $app/state instead of $app/stores.
import { page } from "$app/stores";<script>
import { page } from "$app/stores";
</script>
<h1>{$page.url.pathname}</h1>import { page } from "$app/state";<script>
import { page } from "$app/state";
</script>
<h1>{page.url.pathname}</h1>Examples from the Biome documentation.
ESLint does not have this rule.
Oxlint does not have this rule.
nursery/useSvelteKitRuneImports
nursery · since 2.5.15
{
"linter": {
"rules": {
"nursery": {
"useSvelteKitRuneImports": "error"
}
}
}
}Require internal navigation in SvelteKit apps to use paths built with resolve().
Require the reactive classes from svelte/reactivity instead of built-in objects that are modified.
Require createEventDispatcher calls to declare the types of their events.
Require keyed {#each} blocks in Svelte templates.
Disallow number literal object member names which are not base 10 or use underscore as separator.
Enforce the shorthand syntax for Svelte bind:, class:, and style: directives.