# biome nursery/useVueBaseImport: fix changes program behavior

Internal evidence sheet generated by fixhunt. Not an issue text. A human re-verifies, checks the duplicates
below, and writes the upstream report in their own words following the project's AI policy.

- Tool: biome 2.5.15
- Rule: nursery/useVueBaseImport (tool labels the fix: safe, this fix reported as safe)
- Oracle: fix-changes-behavior
- Judge (Nemotron 3 Ultra, advisory): program-bug, severity low. The program fails both before and after the fix because neither '@vue/reactivity' nor 'vue' packages are installed in the execution environment. The observed difference is purely environmental (missing dependencies), not a semantic change caused by the rewrite itself. The rule correctly rewrites internal imports to the public entry point as documented.
- Program: minimized from 10 to 3 lines

## Reproducer

```js
function require(id) {
}
import { ref } from '@vue/reactivity'; // expect_trigger=true
```

## Commands

```sh
node prog.js
bunx @biomejs/biome lint --only=nursery/useVueBaseImport --write prog.js
node prog.js
```

## Observed

```
stderr before: Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@vue/reactivity' imported from /w/prog.js
stderr after: Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'vue' imported from /w/prog.js
```

## Diff applied by the fix

```diff
--- orig.js	2026-10-22 13:33:03.654620725 -0400
+++ fixed.js	2026-10-22 13:33:05.853657715 -0400
@@ -1,3 +1,3 @@
 function require(id) {
 }
-import { ref } from '@vue/reactivity'; // expect_trigger=true
+import { ref } from 'vue'; // expect_trigger=true
```

## Why the rewrite is not equivalent (model draft, verify before use)

The original import targets `@vue/reactivity`, which may exist as a separate package providing only reactivity utilities like `ref`. After rewriting to `vue`, the module resolver attempts to load the main entry of the `vue` package, which might not export `ref` in the same way or could lack the expected submodule structure entirely. If `vue` does not re-export `ref` from its reactivity internals under the same path or name, the import fails where the original succeeded—or vice versa—altering runtime behavior due to differing module resolution outcomes, even if both aim to access the same functionality. This changes what code is loaded and executed.

## Upstream search

Queries: "useVueBaseImport fix", "nursery useVueBaseImport import specifier", "rule nursery Vue base import transformation", "biome lint Vue reactivity import"

- related: https://github.com/biomejs/biome/pull/7597
  PR #7597 fixes aliased paths in useImportExtensions, a different rule that also rewrites import specifiers but handles path aliases rather than Vue subpackage redirects
- related: https://github.com/biomejs/biome/pull/3274
  PR #3274 adds importMapping options to useImportExtensions for custom import path mappings, same rule category but different mechanism than Vue base import redirect
- related: https://github.com/biomejs/biome/issues/2473
  Issue #2473 reports useImportType splitting React imports incorrectly, same rule category (import type/specifier rewriting) but different framework and construct
- related: https://github.com/biomejs/biome/issues/9848
  Issue #9848 reports panic in useImportType on Vue SFC with multi-line imports, same rule category but different defect (panic vs incorrect rewrite)
- related: https://github.com/biomejs/biome/issues/4539
  Issue #4539 reports useImportType showing 'imports only used as types' in Vue+TS, same rule but different construct (type-only imports vs base import redirect)

<details><summary>All hits</summary>

- [tavily] fix(linter): fix aliased paths in `useImportExtensions` by arendjr · Pull Request #7597 · biomejs/biome · GitHub — https://github.com/biomejs/biome/pull/7597
- [tavily] fix(parse/html): fix disabled vue error message by dyc3 · Pull Request #9879 · biomejs/biome · GitHub — https://github.com/biomejs/biome/pull/9879
- [tavily] fix(js_analyze): mention which dependency the useExhaustiveDependencies fix adds to the list by Netail · Pull Request #9243 · biomejs/biome · GitHub — https://github.com/biomejs/biome/pull/9243
- [tavily] fix(css_parser): fix is at unicode range check by xin2017338 · Pull Request #3745 · biomejs/biome · GitHub — https://github.com/biomejs/biome/pull/3745
- [tavily] fix(useConsistentTestIt): fix panic when applying code fix by dyc3 · Pull Request #9942 · biomejs/biome · GitHub — https://github.com/biomejs/biome/pull/9942
- [tavily] feat(lint): add nursery rule `useImportsFirst` by terror · Pull Request #9272 · biomejs/biome · GitHub — https://github.com/biomejs/biome/pull/9272
- [tavily] feat(biome_js_analyze): `useImportExtensions` - add `importMapping` options by drdaemos · Pull Request #3274 · biomejs/biome · GitHub — https://github.com/biomejs/biome/pull/3274
- [tavily] noUnresolvedImports: False positives for installed packages (zod, clsx types) in standard Next.js setup · Issue #6464 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/6464
- [tavily] feat(biome_css_analyzer): implement noInvalidPositionAtImportRule by t-shiratori · Pull Request #2717 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/2717
- [tavily] 🐛 fix of `lint/nursery/noUnusedImports` does not work correctly · Issue #688 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/688
- [tavily] feat(js_analyze): implement useQwikLoaderLocation by Netail · Pull Request #9809 · biomejs/biome · GitHub — https://github.com/biomejs/biome/pull/9809
- [tavily] useImportExtensions should use .js extension for TypeScript imports · Issue #2967 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/2967
- [tavily] 💅 useAwaitThenable: false positive calling a Promise-returning property of an intersection type (2.5.7+) · Issue #11359 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/11359
- [tavily] 💅 `useDestructuring` doesn't work with type annotations · Issue #8478 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/8478
- [tavily] 🐛 noUnusedImports removes React import unsafely · Issue #571 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/571
- [tavily] 🐛 VSCode extension crashes after updating schema to `1.6.4` and fixing warning `Missing property "options"` with `"options": null` · Issue #2313 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/2313
- [tavily] useImportType splits React import into two, doesn't respect ... — https://github.com/biomejs/biome/issues/2473
- [github, closed] 🐛 Biome crashed while open astro file — https://github.com/biomejs/biome/issues/7837
- [tavily] 🐛 biome lint panics with "assertion failed: start.raw <= end.raw" on Vue SFC with multi-line named imports (useImportType rule) · Issue #9848 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/9848
- [tavily] 💅 Shows "All these imports are only used as types" in Vue+typescript · Issue #4539 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/4539
- [tavily] 💅 Svelte Reactive Blocks marked as Unexpected/Unused · Issue #2571 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/2571
- [tavily] lint/a11y/noLabelWithoutControl: Vue text interpolation is not ... — https://github.com/biomejs/biome/issues/10930

</details>
