From 67f66d6beb4b194c2d11544d6da2c7e4932ba71a Mon Sep 17 00:00:00 2001 From: Irakli Gozalishvili Date: Fri, 9 Oct 2020 12:06:13 -0700 Subject: [PATCH] feat: use ts provided config parsing utility --- src/doctor.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/doctor.ts b/src/doctor.ts index 6c174c1..d74206d 100644 --- a/src/doctor.ts +++ b/src/doctor.ts @@ -20,8 +20,9 @@ export class Doctor { static fromConfigFile(configPath: string, ts: typeof _ts): Doctor { const content = fs.readFileSync(configPath).toString(); + const { config } = ts.parseConfigFileTextToJson(configPath, content) const parsed = ts.parseJsonConfigFileContent( - JSON.parse(content), + config, ts.sys, path.dirname(configPath) );