Skip to content

useVueBaseImport (JavaScript)

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

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.

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";