Skip to content

noSvelteInternal (JavaScript)

Language JavaScript (and super languages)
biome.json
{
"linter": {
"rules": {
"nursery": {
"noSvelteInternal": "error"
}
}
}
}

Disallow importing from svelte/internal.

The svelte/internal module and its submodules, such as svelte/internal/client, hold code that Svelte uses for itself. They aren’t part of the public API, so they can change without warning in any release. In Svelte 5, importing from svelte/internal itself throws an error, because that module only existed for Svelte 4.

Import from public modules such as svelte instead.

import { get_current_component } from "svelte/internal";
code-block.js:1:39 lint/nursery/noSvelteInternal ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

ℹ Don't import from svelte/internal.

> 1 │ import { get_current_component } from "svelte/internal";
│ ^^^^^^^^^^^^^^^^^
2 │

ℹ This module is private to Svelte and can change or disappear in any release.

ℹ Import from a public module, such as svelte, instead.

ℹ This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

import { inspect } from "svelte/internal/client";
code-block.js:1:25 lint/nursery/noSvelteInternal ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

ℹ Don't import from svelte/internal.

> 1 │ import { inspect } from "svelte/internal/client";
│ ^^^^^^^^^^^^^^^^^^^^^^^^
2 │

ℹ This module is private to Svelte and can change or disappear in any release.

ℹ Import from a public module, such as svelte, instead.

ℹ This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

export * from "svelte/internal/server";
code-block.js:1:15 lint/nursery/noSvelteInternal ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

ℹ Don't import from svelte/internal.

> 1 │ export * from "svelte/internal/server";
│ ^^^^^^^^^^^^^^^^^^^^^^^^
2 │

ℹ This module is private to Svelte and can change or disappear in any release.

ℹ Import from a public module, such as svelte, instead.

ℹ This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

await import("svelte/internal");
code-block.js:1:14 lint/nursery/noSvelteInternal ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

ℹ Don't import from svelte/internal.

> 1 │ await import("svelte/internal");
│ ^^^^^^^^^^^^^^^^^
2 │

ℹ This module is private to Svelte and can change or disappear in any release.

ℹ Import from a public module, such as svelte, instead.

ℹ This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

import { mount } from "svelte";
import { writable } from "svelte/store";