From 49cc3ef469c39d8520431b94b401b5f33c928b2f Mon Sep 17 00:00:00 2001 From: Vladimir Sheremet Date: Thu, 4 Jul 2024 10:16:05 +0200 Subject: [PATCH] fix: ignore any d.ts file when searching for config Fixes #429 --- package.json | 2 +- src/config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4d73f44..585f439 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,7 @@ "vitest.configSearchPatternExclude": { "markdownDescription": "A VSCode [glob pattern](https://code.visualstudio.com/docs/editor/glob-patterns) to exclude files from the search for Vitest config files. This pattern affects both workspace and regular config files.", "type": "string", - "default": "{**/node_modules/**,**/.*/**,*.d.ts}", + "default": "{**/node_modules/**,**/.*/**,**/*.d.ts}", "scope": "window" }, "vitest.debuggerAddress": { diff --git a/src/config.ts b/src/config.ts index d6f4f0e..c28e686 100644 --- a/src/config.ts +++ b/src/config.ts @@ -32,7 +32,7 @@ export function getConfig(workspaceFolder?: WorkspaceFolder) { const workspaceConfig = get('workspaceConfig') const rootConfigFile = get('rootConfig') - const configSearchPatternExclude = get('configSearchPatternExclude', '{**/node_modules/**,**/.*/**,*.d.ts}')! + const configSearchPatternExclude = get('configSearchPatternExclude', '{**/node_modules/**,**/.*/**,**/*.d.ts}')! const vitestPackagePath = get('vitestPackagePath') const resolvedVitestPackagePath = workspaceFolder && vitestPackagePath