Skip to content

Commit f022c7e

Browse files
committed
chore: remove undocumented filePathsToIgnore option
1 parent 6e64abd commit f022c7e

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

packages/svelte-check/src/index.ts

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,10 @@ type Result = {
2525
fileCountWithProblems: number;
2626
};
2727

28-
async function openAllDocuments(
29-
workspaceUri: URI,
30-
filePathsToIgnore: string[],
31-
svelteCheck: SvelteCheck
32-
) {
28+
async function openAllDocuments(workspaceUri: URI, svelteCheck: SvelteCheck) {
3329
const files = await glob('**/*.svelte', {
3430
cwd: workspaceUri.fsPath,
35-
ignore: ['node_modules/**'].concat(filePathsToIgnore.map((ignore) => `${ignore}/**`))
31+
ignore: ['node_modules/**']
3632
});
3733
const absFilePaths = files.map((f) => path.resolve(workspaceUri.fsPath, f));
3834

@@ -110,13 +106,12 @@ class DiagnosticsWatcher {
110106
private workspaceUri: URI,
111107
private svelteCheck: SvelteCheck,
112108
private writer: Writer,
113-
filePathsToIgnore: string[],
114109
ignoreInitialAdd: boolean
115110
) {
116111
watch(`${workspaceUri.fsPath}/**/*.{svelte,d.ts,ts,js,jsx,tsx,mjs,cjs,mts,cts}`, {
117-
ignored: ['node_modules', 'vite.config.{js,ts}.timestamp-*']
118-
.concat(filePathsToIgnore)
119-
.map((ignore) => path.join(workspaceUri.fsPath, ignore)),
112+
ignored: ['node_modules', 'vite.config.{js,ts}.timestamp-*'].map((ignore) =>
113+
path.join(workspaceUri.fsPath, ignore)
114+
),
120115
ignoreInitial: ignoreInitialAdd
121116
})
122117
.on('add', (path) => this.updateDocument(path, true))
@@ -198,14 +193,13 @@ parseOptions(async (opts) => {
198193
opts.workspaceUri,
199194
new SvelteCheck(opts.workspaceUri.fsPath, svelteCheckOptions),
200195
writer,
201-
opts.filePathsToIgnore,
202196
!!opts.tsconfig
203197
);
204198
} else {
205199
const svelteCheck = new SvelteCheck(opts.workspaceUri.fsPath, svelteCheckOptions);
206200

207201
if (!opts.tsconfig) {
208-
await openAllDocuments(opts.workspaceUri, opts.filePathsToIgnore, svelteCheck);
202+
await openAllDocuments(opts.workspaceUri, svelteCheck);
209203
}
210204
const result = await getDiagnostics(opts.workspaceUri, writer, svelteCheck);
211205
if (

packages/svelte-check/src/options.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export interface SvelteCheckCliOptions {
99
watch: boolean;
1010
preserveWatchOutput: boolean;
1111
tsconfig?: string;
12-
filePathsToIgnore: string[];
1312
failOnWarnings: boolean;
1413
compilerWarnings: Record<string, 'error' | 'ignore'>;
1514
diagnosticSources: DiagnosticSource[];
@@ -73,7 +72,6 @@ export function parseOptions(cb: (opts: SvelteCheckCliOptions) => any) {
7372
watch: !!opts.watch,
7473
preserveWatchOutput: !!opts.preserveWatchOutput,
7574
tsconfig: getTsconfig(opts, workspaceUri.fsPath),
76-
filePathsToIgnore: getFilepathsToIgnore(opts),
7775
failOnWarnings: !!opts['fail-on-warnings'],
7876
compilerWarnings: getCompilerWarnings(opts),
7977
diagnosticSources: getDiagnosticSources(opts),

0 commit comments

Comments
 (0)