diff --git a/packages/svelte-check/src/index.ts b/packages/svelte-check/src/index.ts index 6e64414ed..1435d4840 100644 --- a/packages/svelte-check/src/index.ts +++ b/packages/svelte-check/src/index.ts @@ -27,12 +27,11 @@ type Result = { async function openAllDocuments( workspaceUri: URI, - filePathsToIgnore: string[], svelteCheck: SvelteCheck ) { const files = await glob('**/*.svelte', { cwd: workspaceUri.fsPath, - ignore: ['node_modules/**'].concat(filePathsToIgnore.map((ignore) => `${ignore}/**`)) + ignore: ['node_modules/**'] }); const absFilePaths = files.map((f) => path.resolve(workspaceUri.fsPath, f)); @@ -110,12 +109,10 @@ class DiagnosticsWatcher { private workspaceUri: URI, private svelteCheck: SvelteCheck, private writer: Writer, - filePathsToIgnore: string[], ignoreInitialAdd: boolean ) { watch(`${workspaceUri.fsPath}/**/*.{svelte,d.ts,ts,js,jsx,tsx,mjs,cjs,mts,cts}`, { ignored: ['node_modules', 'vite.config.{js,ts}.timestamp-*'] - .concat(filePathsToIgnore) .map((ignore) => path.join(workspaceUri.fsPath, ignore)), ignoreInitial: ignoreInitialAdd }) @@ -198,14 +195,13 @@ parseOptions(async (opts) => { opts.workspaceUri, new SvelteCheck(opts.workspaceUri.fsPath, svelteCheckOptions), writer, - opts.filePathsToIgnore, !!opts.tsconfig ); } else { const svelteCheck = new SvelteCheck(opts.workspaceUri.fsPath, svelteCheckOptions); if (!opts.tsconfig) { - await openAllDocuments(opts.workspaceUri, opts.filePathsToIgnore, svelteCheck); + await openAllDocuments(opts.workspaceUri, svelteCheck); } const result = await getDiagnostics(opts.workspaceUri, writer, svelteCheck); if ( diff --git a/packages/svelte-check/src/options.ts b/packages/svelte-check/src/options.ts index bf270e3c4..0123b2305 100644 --- a/packages/svelte-check/src/options.ts +++ b/packages/svelte-check/src/options.ts @@ -9,7 +9,6 @@ export interface SvelteCheckCliOptions { watch: boolean; preserveWatchOutput: boolean; tsconfig?: string; - filePathsToIgnore: string[]; failOnWarnings: boolean; compilerWarnings: Record; diagnosticSources: DiagnosticSource[]; @@ -73,7 +72,6 @@ export function parseOptions(cb: (opts: SvelteCheckCliOptions) => any) { watch: !!opts.watch, preserveWatchOutput: !!opts.preserveWatchOutput, tsconfig: getTsconfig(opts, workspaceUri.fsPath), - filePathsToIgnore: getFilepathsToIgnore(opts), failOnWarnings: !!opts['fail-on-warnings'], compilerWarnings: getCompilerWarnings(opts), diagnosticSources: getDiagnosticSources(opts),