8000 autoImportSpecifierExcludeRegexes is ignored in Vue script setup · Issue #5364 · vuejs/language-tools · GitHub
[go: up one dir, main page]

Skip to content

autoImportSpecifierExcludeRegexes is ignored in Vue script setup #5364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
f3oall opened this issue May 15, 2025 · 1 comment
Open

autoImportSpecifierExcludeRegexes is ignored in Vue script setup #5364

f3oall opened this issue May 15, 2025 · 1 comment

Comments

@f3oall
Copy link
f3oall commented May 15, 2025

Vue - Official extension or vue-tsc version

2.2.10

VSCode version

1.100.1

Vue version

3.5.13

TypeScript version

5.8.3

System Info

System:
    OS: Linux 6.11 Ubuntu 24.04.2 LTS 24.04.2 LTS (Noble Numbat)
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i9-12900H
    Memory: 23.38 GB / 31.01 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 22.15.0 - ~/.nvm/versions/node/v22.15.0/bin/node
    npm: 10.9.2 - ~/.nvm/versions/node/v22.15.0/bin/npm
    pnpm: 10.10.0 - ~/.nvm/versions/node/v22.15.0/bin/pnpm

package.json dependencies

Steps to reproduce

Add the following vscode settings:

{
   "typescript.preferences.autoImportSpecifierExcludeRegexes": ["^node:"]
}

Try to auto import ref, it still suggests node:process. In .ts files it works.

What is expected?

Vue should respect typescript autoImportSpecifierExcludeRegexes

What is actually happening?

Vue doesn't respect typescript autoImportSpecifierExcludeRegexes

Link to minimal reproduction

No response

Any additional comments?

Is there any workaround?

@jay-zahiri
Copy link
jay-zahiri commented May 15, 2025

Just discovered that preferTypeOnlyAutoImports = true is also ignored so I'll tag along this issue =) Also, I don't think <script setup> matters, in any <script> this will be ignored. It's probably the fact that it's TS inside a SFC (.vue-file)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
0