noSvelteInternal (JavaScript)
Language JavaScript (and super languages)
Summary
Section titled “Summary”- Rule available since:
v2.6.3 - Diagnostic Category:
lint/nursery/noSvelteInternal - This rule doesn’t have a fix.
- The default severity of this rule is information.
- This rule belongs to the following domains:
- Sources:
- Same as
svelte/no-svelte-internal
- Same as
How to configure
Section titled “How to configure”{ "linter": { "rules": { "nursery": { "noSvelteInternal": "error" } } }}Description
Section titled “Description”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.
Examples
Section titled “Examples”Invalid
Section titled “Invalid”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";Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.