From c741d83bf7c2fdc7977f5f25260b54c2a674de69 Mon Sep 17 00:00:00 2001 From: vvakame Date: Sun, 5 Feb 2017 16:30:32 +0900 Subject: [PATCH] feat(tsfmt): support empty tsconfig.json that does not have files, include and exclude field --- lib/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils.ts b/lib/utils.ts index 522b2e4..44d9fca 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -61,7 +61,7 @@ export function readFilesFromTsconfig(configPath: string): string[] { } else if (tsconfig.include || tsconfig.exclude) { return tsMatchFiles(tsconfig.exclude || [], tsconfig.include || []); } else { - throw new Error(`No "files" or "filesGlob" section present in tsconfig.json`); + return tsMatchFiles([], []); } function tsMatchFiles(excludes: string[], includes: string[]) {