From 4af47f188772591ecd996eb18a853c2cf1cd83f2 Mon Sep 17 00:00:00 2001 From: Armando Aguirre Date: Thu, 25 Jan 2018 14:06:11 -0800 Subject: [PATCH 1/2] Added NoEmit=true when jsconfig is present --- src/compiler/commandLineParser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index eb9f1e3cf34..bea29d3fc1c 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -1795,7 +1795,7 @@ namespace ts { function getDefaultCompilerOptions(configFileName?: string) { const options: CompilerOptions = getBaseFileName(configFileName) === "jsconfig.json" - ? { allowJs: true, maxNodeModuleJsDepth: 2, allowSyntheticDefaultImports: true, skipLibCheck: true } + ? { allowJs: true, maxNodeModuleJsDepth: 2, allowSyntheticDefaultImports: true, skipLibCheck: true, noEmit: true } : {}; return options; } From 25b1d9d6a5c1a0d5cc094dadc9c44514bf26b28d Mon Sep 17 00:00:00 2001 From: Armando Aguirre Date: Thu, 25 Jan 2018 14:48:44 -0800 Subject: [PATCH 2/2] Updated tests --- src/harness/unittests/convertCompilerOptionsFromJson.ts | 8 ++++++-- src/harness/unittests/telemetry.ts | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/harness/unittests/convertCompilerOptionsFromJson.ts b/src/harness/unittests/convertCompilerOptionsFromJson.ts index 0bad2ba1e3a..6a88f2ba67e 100644 --- a/src/harness/unittests/convertCompilerOptionsFromJson.ts +++ b/src/harness/unittests/convertCompilerOptionsFromJson.ts @@ -457,6 +457,7 @@ namespace ts { maxNodeModuleJsDepth: 2, allowSyntheticDefaultImports: true, skipLibCheck: true, + noEmit: true, module: ModuleKind.CommonJS, target: ScriptTarget.ES5, noImplicitAny: false, @@ -486,6 +487,7 @@ namespace ts { maxNodeModuleJsDepth: 2, allowSyntheticDefaultImports: true, skipLibCheck: true, + noEmit: true, module: ModuleKind.CommonJS, target: ScriptTarget.ES5, noImplicitAny: false, @@ -510,7 +512,8 @@ namespace ts { allowJs: true, maxNodeModuleJsDepth: 2, allowSyntheticDefaultImports: true, - skipLibCheck: true + skipLibCheck: true, + noEmit: true }, errors: [{ file: undefined, @@ -532,7 +535,8 @@ namespace ts { allowJs: true, maxNodeModuleJsDepth: 2, allowSyntheticDefaultImports: true, - skipLibCheck: true + skipLibCheck: true, + noEmit: true }, errors: [] } diff --git a/src/harness/unittests/telemetry.ts b/src/harness/unittests/telemetry.ts index 9bb2db73801..5cea42efcf5 100644 --- a/src/harness/unittests/telemetry.ts +++ b/src/harness/unittests/telemetry.ts @@ -185,6 +185,7 @@ namespace ts.projectSystem { allowSyntheticDefaultImports: true, maxNodeModuleJsDepth: 2, skipLibCheck: true, + noEmit: true }; it("sends telemetry for typeAcquisition settings", () => {