Skip to content

Commit

Permalink
chore: remove undocumented filePathsToIgnore option
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Jun 26, 2024
1 parent 6e64abd commit 8e0e0b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 2 additions & 6 deletions packages/svelte-check/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down Expand Up @@ -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
})
Expand Down Expand Up @@ -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 (
Expand Down
2 changes: 0 additions & 2 deletions packages/svelte-check/src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export interface SvelteCheckCliOptions {
watch: boolean;
preserveWatchOutput: boolean;
tsconfig?: string;
filePathsToIgnore: string[];
failOnWarnings: boolean;
compilerWarnings: Record<string, 'error' | 'ignore'>;
diagnosticSources: DiagnosticSource[];
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit 8e0e0b1

Please sign in to comment.