useVueBaseImport (JavaScript)
Language JavaScript (and super languages)
Summary
Section titled “Summary”- Diagnostic Category:
lint/nursery/useVueBaseImport - This rule has a safe fix.
- The default severity of this rule is information.
- This rule belongs to the following domains:
- Sources:
- Same as
vue/prefer-import-from-vue
- Same as
How to configure
Section titled “How to configure”{ "linter": { "rules": { "nursery": { "useVueBaseImport": "error" } } }}Description
Section titled “Description”Enforce importing Vue’s public entry point instead of internal Vue packages.
The @vue/runtime-dom, @vue/runtime-core, @vue/reactivity, and @vue/shared packages are internal implementation packages. Their public exports should be imported from vue instead.
Examples
Section titled “Examples”Invalid
Section titled “Invalid”import { computed } from "@vue/reactivity";code-block.js:1:26 lint/nursery/useVueBaseImport FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ℹ Don't import the internal Vue package '@vue/reactivity'.
> 1 │ import { computed } from "@vue/reactivity";
│ ^^^^^^^^^^^^^^^^^
2 │
ℹ The public 'vue' entry point re-exports Vue's supported runtime APIs.
ℹ 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.
ℹ Safe fix: Import 'vue' instead.
1 │ import·{·computed·}·from·"@vue/reactivity";
│ - -----------
export * from "@vue/shared";code-block.js:1:15 lint/nursery/useVueBaseImport ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ℹ Don't import the internal Vue package '@vue/shared'.
> 1 │ export * from "@vue/shared";
│ ^^^^^^^^^^^^^
2 │
ℹ The public 'vue' entry point re-exports Vue's supported runtime APIs.
ℹ 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 { computed } from "vue";import { internalOnly } from "@vue/reactivity";Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.