Turn on skipLibCheck for js-only inferred project and external project (#11399)

* Turn on skipLibCheck for js-only inferred project and external project

* avoid changing compiler options

* Update tests
This commit is contained in:
Zhengbo Li
2016-10-11 19:19:40 -07:00
committed by GitHub
parent 2671668d86
commit 460de66311
5 changed files with 151 additions and 23 deletions

View File

@@ -975,7 +975,7 @@ namespace ts {
basePath: string, errors: Diagnostic[], configFileName?: string): CompilerOptions {
const options: CompilerOptions = getBaseFileName(configFileName) === "jsconfig.json"
? { allowJs: true, maxNodeModuleJsDepth: 2, allowSyntheticDefaultImports: true }
? { allowJs: true, maxNodeModuleJsDepth: 2, allowSyntheticDefaultImports: true, skipLibCheck: true }
: {};
convertOptionsFromJson(optionDeclarations, jsonOptions, basePath, options, Diagnostics.Unknown_compiler_option_0, errors);
return options;