Skip to content
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

Typecheck does not respect CLI base directory #7392

Closed
6 tasks done
Barbapapazes opened this issue Jan 31, 2025 · 2 comments
Closed
6 tasks done

Typecheck does not respect CLI base directory #7392

Barbapapazes opened this issue Jan 31, 2025 · 2 comments

Comments

@Barbapapazes
Copy link
Contributor

Describe the bug

Hello 👋,

I'm using this sort of command vitest resources/js/Components/ with the following option in my vite.config.ts:

 test: 
    typecheck: {
      enabled: true,
      tsconfig: 'tsconfig.test.json',
    },
  },

It's working file except that the type checking will throw errors for files that are not in the directory resources/js/Components. For example, it will throw errors that occurs in resources/js/Utils or resources/js/Composables which is a little annoying.

Reproduction

/ (unable to have typechecking running withing Stackblitz)

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
    CPU: (16) x64 AMD Ryzen 9 PRO 8945HS w/ Radeon 780M Graphics
    Memory: 24.48 GB / 30.25 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 22.12.0 - ~/.nvm/versions/node/v22.12.0/bin/node
    npm: 10.9.2 - ~/.nvm/versions/node/v22.12.0/bin/npm
    pnpm: 9.15.0 - ~/.nvm/versions/node/v22.12.0/bin/pnpm
  npmPackages:
    @vitejs/plugin-vue: ^5.2.1 => 5.2.1 
    vite: ^6.0 => 6.0.3 
    vitest: ^3.0.4 => 3.0.4

Used Package Manager

pnpm

Validations

Copy link

Hello @Barbapapazes. Please provide a minimal reproduction using a GitHub repository or StackBlitz (you can also use examples). Issues marked with needs reproduction will be closed if they have no activity within 3 days.

@AriPerkkio
Copy link
Member

Reproduction

/ (unable to have typechecking running withing Stackblitz)

You can use Github repositories too. But typechecking works just fine in Stackblitz:
https://stackblitz.com/~/edit/vitest-type-fail-repro-wyn3x7.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 4, 2025
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

2 participants