From 353028c528d52ee8aa4eae138f2ddb1c7e266041 Mon Sep 17 00:00:00 2001 From: haoqixu Date: Fri, 14 Mar 2025 12:36:17 +0800 Subject: [PATCH 1/6] Align error for invalid enum option with strada --- internal/tsoptions/tsconfigparsing.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/tsoptions/tsconfigparsing.go b/internal/tsoptions/tsconfigparsing.go index faad993acd..68e29777f3 100644 --- a/internal/tsoptions/tsconfigparsing.go +++ b/internal/tsoptions/tsconfigparsing.go @@ -395,6 +395,9 @@ func convertJsonOption( return normalizeNonListOptionValue(opt, basePath, validatedValue), errors } } else { + if opt.Kind == CommandLineOptionTypeEnum { + return nil, []*ast.Diagnostic{createDiagnosticForInvalidEnumType(opt, sourceFile, valueExpression)} + } return nil, []*ast.Diagnostic{createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, valueExpression, diagnostics.Compiler_option_0_requires_a_value_of_type_1, opt.Name, getCompilerOptionValueTypeString(opt))} } } From ea674fac697933178c9e30e3046259fc99f2263f Mon Sep 17 00:00:00 2001 From: haoqixu Date: Sun, 16 Mar 2025 02:26:56 +0800 Subject: [PATCH 2/6] add test --- internal/tsoptions/tsconfigparsing_test.go | 15 ++ ...on and invalid enum value with json api.js | 145 ++++++++++++++++ ...alid enum value with jsonSourceFile api.js | 159 ++++++++++++++++++ 3 files changed, 319 insertions(+) create mode 100644 testdata/baselines/reference/config/tsconfigParsing/reports errors for wrong type option and invalid enum value with json api.js create mode 100644 testdata/baselines/reference/config/tsconfigParsing/reports errors for wrong type option and invalid enum value with jsonSourceFile api.js diff --git a/internal/tsoptions/tsconfigparsing_test.go b/internal/tsoptions/tsconfigparsing_test.go index 7602369c1e..e7ab2a7111 100644 --- a/internal/tsoptions/tsconfigparsing_test.go +++ b/internal/tsoptions/tsconfigparsing_test.go @@ -484,6 +484,21 @@ var parseJsonConfigFileTests = []struct { allFileList: map[string]string{"/app.ts": ""}, }}, }, + { + title: "reports errors for wrong type option and invalid enum value", + input: []testConfig{{ + jsonText: `{ + "compilerOptions": { + "target": "invalid value", + "removeComments": "should be a boolean", + "moduleResolution": "invalid value" + } + }`, + configFileName: "tsconfig.json", + basePath: "/", + allFileList: map[string]string{"/app.ts": ""}, + }}, + }, } var tsconfigWithExtends = `{ diff --git a/testdata/baselines/reference/config/tsconfigParsing/reports errors for wrong type option and invalid enum value with json api.js b/testdata/baselines/reference/config/tsconfigParsing/reports errors for wrong type option and invalid enum value with json api.js new file mode 100644 index 0000000000..e6acf659d1 --- /dev/null +++ b/testdata/baselines/reference/config/tsconfigParsing/reports errors for wrong type option and invalid enum value with json api.js @@ -0,0 +1,145 @@ +Fs:: +//// [/app.ts] + + +//// [/tsconfig.json] +{ + "compilerOptions": { + "target": "invalid value", + "removeComments": "should be a boolean", + "moduleResolution": "invalid value" + } + } + + +configFileName:: tsconfig.json +CompilerOptions:: +{ + "allowJs": null, + "allowArbitraryExtensions": null, + "allowSyntheticDefaultImports": null, + "allowImportingTsExtensions": null, + "allowNonTsExtensions": null, + "allowUmdGlobalAccess": null, + "allowUnreachableCode": null, + "allowUnusedLabels": null, + "assumeChangesOnlyAffectDirectDependencies": null, + "alwaysStrict": null, + "baseUrl": "", + "build": null, + "checkJs": null, + "customConditions": null, + "composite": null, + "emitDeclarationOnly": null, + "emitBOM": null, + "emitDecoratorMetadata": null, + "downlevelIteration": null, + "declaration": null, + "declarationDir": "", + "declarationMap": null, + "disableSizeLimit": null, + "disableSourceOfProjectReferenceRedirect": null, + "disableSolutionSearching": null, + "disableReferencedProjectLoad": null, + "esModuleInterop": null, + "exactOptionalPropertyTypes": null, + "experimentalDecorators": null, + "forceConsistentCasingInFileNames": null, + "isolatedModules": null, + "isolatedDeclarations": null, + "ignoreDeprecations": "", + "importHelpers": null, + "inlineSourceMap": null, + "inlineSources": null, + "init": null, + "incremental": null, + "jsx": 0, + "jsxFactory": "", + "jsxFragmentFactory": "", + "jsxImportSource": "", + "keyofStringsOnly": null, + "lib": null, + "locale": "", + "mapRoot": "", + "module": 0, + "moduleResolution": 0, + "moduleSuffixes": null, + "moduleDetectionKind": 0, + "newLine": 0, + "noEmit": null, + "noCheck": null, + "noErrorTruncation": null, + "noFallthroughCasesInSwitch": null, + "noImplicitAny": null, + "noImplicitThis": null, + "noImplicitReturns": null, + "noEmitHelpers": null, + "noLib": null, + "noPropertyAccessFromIndexSignature": null, + "noUncheckedIndexedAccess": null, + "noEmitOnError": null, + "noUnusedLocals": null, + "noUnusedParameters": null, + "noResolve": null, + "noImplicitOverride": null, + "noUncheckedSideEffectImports": null, + "out": "", + "outDir": "", + "outFile": "", + "paths": null, + "preserveConstEnums": null, + "preserveSymlinks": null, + "project": "", + "resolveJsonModule": null, + "resolvePackageJsonExports": null, + "resolvePackageJsonImports": null, + "removeComments": null, + "rewriteRelativeImportExtensions": null, + "reactNamespace": "", + "rootDir": "", + "rootDirs": null, + "skipLibCheck": null, + "strict": null, + "strictBindCallApply": null, + "strictBuiltinIteratorReturn": null, + "strictFunctionTypes": null, + "strictNullChecks": null, + "strictPropertyInitialization": null, + "stripInternal": null, + "skipDefaultLibCheck": null, + "sourceMap": null, + "sourceRoot": "", + "suppressOutputPathCheck": null, + "target": 0, + "traceResolution": null, + "tsBuildInfoFile": "", + "typeRoots": null, + "types": null, + "useDefineForClassFields": null, + "useUnknownInCatchVariables": null, + "verbatimModuleSyntax": null, + "maxNodeModuleJsDepth": null, + "configFilePath": "/tsconfig.json", + "noDtsResolution": null, + "pathsBasePath": "", + "diagnostics": null, + "extendedDiagnostics": null, + "generateCpuProfile": "", + "generateTrace": "", + "listEmittedFiles": null, + "listFiles": null, + "explainFiles": null, + "listFilesOnly": null, + "noEmitForJsFiles": null, + "preserveWatchOutput": null, + "pretty": null, + "version": null, + "watch": null, + "showConfig": null, + "tscBuild": null +} + +FileNames:: +/app.ts +Errors:: +error TS5024: Compiler option 'removeComments' requires a value of type boolean. diff --git a/testdata/baselines/reference/config/tsconfigParsing/reports errors for wrong type option and invalid enum value with jsonSourceFile api.js b/testdata/baselines/reference/config/tsconfigParsing/reports errors for wrong type option and invalid enum value with jsonSourceFile api.js new file mode 100644 index 0000000000..425998f942 --- /dev/null +++ b/testdata/baselines/reference/config/tsconfigParsing/reports errors for wrong type option and invalid enum value with jsonSourceFile api.js @@ -0,0 +1,159 @@ +Fs:: +//// [/app.ts] + + +//// [/tsconfig.json] +{ + "compilerOptions": { + "target": "invalid value", + "removeComments": "should be a boolean", + "moduleResolution": "invalid value" + } + } + + +configFileName:: tsconfig.json +CompilerOptions:: +{ + "allowJs": null, + "allowArbitraryExtensions": null, + "allowSyntheticDefaultImports": null, + "allowImportingTsExtensions": null, + "allowNonTsExtensions": null, + "allowUmdGlobalAccess": null, + "allowUnreachableCode": null, + "allowUnusedLabels": null, + "assumeChangesOnlyAffectDirectDependencies": null, + "alwaysStrict": null, + "baseUrl": "", + "build": null, + "checkJs": null, + "customConditions": null, + "composite": null, + "emitDeclarationOnly": null, + "emitBOM": null, + "emitDecoratorMetadata": null, + "downlevelIteration": null, + "declaration": null, + "declarationDir": "", + "declarationMap": null, + "disableSizeLimit": null, + "disableSourceOfProjectReferenceRedirect": null, + "disableSolutionSearching": null, + "disableReferencedProjectLoad": null, + "esModuleInterop": null, + "exactOptionalPropertyTypes": null, + "experimentalDecorators": null, + "forceConsistentCasingInFileNames": null, + "isolatedModules": null, + "isolatedDeclarations": null, + "ignoreDeprecations": "", + "importHelpers": null, + "inlineSourceMap": null, + "inlineSources": null, + "init": null, + "incremental": null, + "jsx": 0, + "jsxFactory": "", + "jsxFragmentFactory": "", + "jsxImportSource": "", + "keyofStringsOnly": null, + "lib": null, + "locale": "", + "mapRoot": "", + "module": 0, + "moduleResolution": 0, + "moduleSuffixes": null, + "moduleDetectionKind": 0, + "newLine": 0, + "noEmit": null, + "noCheck": null, + "noErrorTruncation": null, + "noFallthroughCasesInSwitch": null, + "noImplicitAny": null, + "noImplicitThis": null, + "noImplicitReturns": null, + "noEmitHelpers": null, + "noLib": null, + "noPropertyAccessFromIndexSignature": null, + "noUncheckedIndexedAccess": null, + "noEmitOnError": null, + "noUnusedLocals": null, + "noUnusedParameters": null, + "noResolve": null, + "noImplicitOverride": null, + "noUncheckedSideEffectImports": null, + "out": "", + "outDir": "", + "outFile": "", + "paths": null, + "preserveConstEnums": null, + "preserveSymlinks": null, + "project": "", + "resolveJsonModule": null, + "resolvePackageJsonExports": null, + "resolvePackageJsonImports": null, + "removeComments": null, + "rewriteRelativeImportExtensions": null, + "reactNamespace": "", + "rootDir": "", + "rootDirs": null, + "skipLibCheck": null, + "strict": null, + "strictBindCallApply": null, + "strictBuiltinIteratorReturn": null, + "strictFunctionTypes": null, + "strictNullChecks": null, + "strictPropertyInitialization": null, + "stripInternal": null, + "skipDefaultLibCheck": null, + "sourceMap": null, + "sourceRoot": "", + "suppressOutputPathCheck": null, + "target": 0, + "traceResolution": null, + "tsBuildInfoFile": "", + "typeRoots": null, + "types": null, + "useDefineForClassFields": null, + "useUnknownInCatchVariables": null, + "verbatimModuleSyntax": null, + "maxNodeModuleJsDepth": null, + "configFilePath": "/tsconfig.json", + "noDtsResolution": null, + "pathsBasePath": "", + "diagnostics": null, + "extendedDiagnostics": null, + "generateCpuProfile": "", + "generateTrace": "", + "listEmittedFiles": null, + "listFiles": null, + "explainFiles": null, + "listFilesOnly": null, + "noEmitForJsFiles": null, + "preserveWatchOutput": null, + "pretty": null, + "version": null, + "watch": null, + "showConfig": null, + "tscBuild": null +} + +FileNames:: +/app.ts +Errors:: +tsconfig.json:3:15 - error TS6046: Argument for '--target' option must be: 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext'. + +3 "target": "invalid value", +   ~~~~~~~~~~~~~~~ + +tsconfig.json:4:23 - error TS5024: Compiler option 'removeComments' requires a value of type boolean. + +4 "removeComments": "should be a boolean", +   ~~~~~~~~~~~~~~~~~~~~~ + +tsconfig.json:5:25 - error TS6046: Argument for '--moduleResolution' option must be: 'node16', 'nodenext', 'bundler'. + +5 "moduleResolution": "invalid value" +   ~~~~~~~~~~~~~~~ + From b0b2760e5b9a3af8ebad60055354e9c01727c10c Mon Sep 17 00:00:00 2001 From: haoqixu Date: Sun, 16 Mar 2025 04:27:32 +0800 Subject: [PATCH 3/6] fix parsing of enum option --- internal/tsoptions/tsconfigparsing.go | 18 +++--------------- internal/tsoptions/tsconfigparsing_test.go | 2 +- ...hen tsconfig have excludes with json api.js | 2 +- ...ig have excludes with jsonSourceFile api.js | 2 +- 4 files changed, 6 insertions(+), 18 deletions(-) diff --git a/internal/tsoptions/tsconfigparsing.go b/internal/tsoptions/tsconfigparsing.go index 68e29777f3..6ac93b5621 100644 --- a/internal/tsoptions/tsconfigparsing.go +++ b/internal/tsoptions/tsconfigparsing.go @@ -139,15 +139,7 @@ func parseOwnConfigOfJsonSourceFile( } if parentOption != nil && parentOption.Name != "undefined" && value != nil { if option != nil && option.Name != "" { - commandLineOptionEnumMapVal := option.EnumMap() - if commandLineOptionEnumMapVal != nil { - val, ok := commandLineOptionEnumMapVal.Get(strings.ToLower(value.(string))) - if ok { - propertySetErrors = append(propertySetErrors, ParseCompilerOptions(option.Name, val, options)...) - } - } else { - propertySetErrors = append(propertySetErrors, ParseCompilerOptions(option.Name, value, options)...) - } + propertySetErrors = append(propertySetErrors, ParseCompilerOptions(option.Name, value, options)...) } else if keyText != "" { if parentOption.ElementOptions != nil { // !!! TODO: support suggestion @@ -276,8 +268,7 @@ func isCompilerOptionsValue(option *CommandLineOption, value any) bool { return reflect.TypeOf(value) == orderedMapType } if option.Kind == "enum" && reflect.TypeOf(value).Kind() == reflect.String { - _, ok := option.EnumMap().Get(strings.ToLower(value.(string))) - return ok || (option.DeprecatedKeys() != nil && option.DeprecatedKeys().Has(strings.ToLower(value.(string)))) + return true } } return false @@ -385,7 +376,7 @@ func convertJsonOption( } else { return convertJsonOption(opt.Elements(), value, basePath, propertyAssignment, valueExpression, sourceFile) } - } else if !(reflect.TypeOf(optType).Kind() == reflect.String) { + } else if optType == CommandLineOptionTypeEnum { return convertJsonOptionOfEnumType(opt, value.(string), valueExpression, sourceFile) } validatedValue, errors := validateJsonOptionValue(opt, value, valueExpression, sourceFile) @@ -395,9 +386,6 @@ func convertJsonOption( return normalizeNonListOptionValue(opt, basePath, validatedValue), errors } } else { - if opt.Kind == CommandLineOptionTypeEnum { - return nil, []*ast.Diagnostic{createDiagnosticForInvalidEnumType(opt, sourceFile, valueExpression)} - } return nil, []*ast.Diagnostic{createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, valueExpression, diagnostics.Compiler_option_0_requires_a_value_of_type_1, opt.Name, getCompilerOptionValueTypeString(opt))} } } diff --git a/internal/tsoptions/tsconfigparsing_test.go b/internal/tsoptions/tsconfigparsing_test.go index e7ab2a7111..147f8812c1 100644 --- a/internal/tsoptions/tsconfigparsing_test.go +++ b/internal/tsoptions/tsconfigparsing_test.go @@ -721,7 +721,7 @@ func TestParseSrcCompiler(t *testing.T) { opts := parseConfigFileContent.CompilerOptions() assert.DeepEqual(t, opts, &core.CompilerOptions{ - Lib: []string{"es2020"}, + Lib: []string{"lib.es2020.d.ts"}, ModuleKind: core.ModuleKindNodeNext, ModuleResolution: core.ModuleResolutionKindNodeNext, NewLine: core.NewLineKindLF, diff --git a/testdata/baselines/reference/config/tsconfigParsing/returns error when tsconfig have excludes with json api.js b/testdata/baselines/reference/config/tsconfigParsing/returns error when tsconfig have excludes with json api.js index 37694a40b4..8bf62ca82d 100644 --- a/testdata/baselines/reference/config/tsconfigParsing/returns error when tsconfig have excludes with json api.js +++ b/testdata/baselines/reference/config/tsconfigParsing/returns error when tsconfig have excludes with json api.js @@ -63,7 +63,7 @@ CompilerOptions:: "jsxImportSource": "", "keyofStringsOnly": null, "lib": [ - "es5" + "lib.es5.d.ts" ], "locale": "", "mapRoot": "", diff --git a/testdata/baselines/reference/config/tsconfigParsing/returns error when tsconfig have excludes with jsonSourceFile api.js b/testdata/baselines/reference/config/tsconfigParsing/returns error when tsconfig have excludes with jsonSourceFile api.js index 6629f6c61b..c910afd609 100644 --- a/testdata/baselines/reference/config/tsconfigParsing/returns error when tsconfig have excludes with jsonSourceFile api.js +++ b/testdata/baselines/reference/config/tsconfigParsing/returns error when tsconfig have excludes with jsonSourceFile api.js @@ -63,7 +63,7 @@ CompilerOptions:: "jsxImportSource": "", "keyofStringsOnly": null, "lib": [ - "es5" + "lib.es5.d.ts" ], "locale": "", "mapRoot": "", From 3411451f106ebf654039b15b7e15022770e12c56 Mon Sep 17 00:00:00 2001 From: haoqixu Date: Sun, 16 Mar 2025 04:32:05 +0800 Subject: [PATCH 4/6] refactor: use switch and enum const --- internal/tsoptions/tsconfigparsing.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/internal/tsoptions/tsconfigparsing.go b/internal/tsoptions/tsconfigparsing.go index 6ac93b5621..0adeb3c9c0 100644 --- a/internal/tsoptions/tsconfigparsing.go +++ b/internal/tsoptions/tsconfigparsing.go @@ -367,18 +367,20 @@ func convertJsonOption( } } if isCompilerOptionsValue(opt, value) { - optType := opt.Kind - if optType == "list" { + + switch opt.Kind { + case CommandLineOptionTypeList: return convertJsonOptionOfListType(opt, value, basePath, propertyAssignment, valueExpression, sourceFile) // as ArrayLiteralExpression | undefined - } else if optType == "listOrElement" { + case CommandLineOptionTypeListOrElement: if reflect.TypeOf(value).Kind() == reflect.Slice { return convertJsonOptionOfListType(opt, value, basePath, propertyAssignment, valueExpression, sourceFile) } else { return convertJsonOption(opt.Elements(), value, basePath, propertyAssignment, valueExpression, sourceFile) } - } else if optType == CommandLineOptionTypeEnum { + case CommandLineOptionTypeEnum: return convertJsonOptionOfEnumType(opt, value.(string), valueExpression, sourceFile) } + validatedValue, errors := validateJsonOptionValue(opt, value, valueExpression, sourceFile) if len(errors) > 0 || validatedValue == nil { return validatedValue, errors From e7871d6eb41ccfc045db957a4fa170a377244c77 Mon Sep 17 00:00:00 2001 From: haoqixu Date: Sun, 16 Mar 2025 04:45:18 +0800 Subject: [PATCH 5/6] fix lint --- internal/tsoptions/tsconfigparsing.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/tsoptions/tsconfigparsing.go b/internal/tsoptions/tsconfigparsing.go index 0adeb3c9c0..fbcb75e507 100644 --- a/internal/tsoptions/tsconfigparsing.go +++ b/internal/tsoptions/tsconfigparsing.go @@ -367,7 +367,6 @@ func convertJsonOption( } } if isCompilerOptionsValue(opt, value) { - switch opt.Kind { case CommandLineOptionTypeList: return convertJsonOptionOfListType(opt, value, basePath, propertyAssignment, valueExpression, sourceFile) // as ArrayLiteralExpression | undefined From a91c709c5451095f7f3556c6b54c4b157de32aaa Mon Sep 17 00:00:00 2001 From: haoqixu Date: Tue, 18 Mar 2025 12:59:50 +0800 Subject: [PATCH 6/6] baseline-accept --- ...on and invalid enum value with json api.js | 123 +----------------- ...alid enum value with jsonSourceFile api.js | 123 +----------------- 2 files changed, 2 insertions(+), 244 deletions(-) diff --git a/testdata/baselines/reference/config/tsconfigParsing/reports errors for wrong type option and invalid enum value with json api.js b/testdata/baselines/reference/config/tsconfigParsing/reports errors for wrong type option and invalid enum value with json api.js index e6acf659d1..78f5175eef 100644 --- a/testdata/baselines/reference/config/tsconfigParsing/reports errors for wrong type option and invalid enum value with json api.js +++ b/testdata/baselines/reference/config/tsconfigParsing/reports errors for wrong type option and invalid enum value with json api.js @@ -15,128 +15,7 @@ Fs:: configFileName:: tsconfig.json CompilerOptions:: { - "allowJs": null, - "allowArbitraryExtensions": null, - "allowSyntheticDefaultImports": null, - "allowImportingTsExtensions": null, - "allowNonTsExtensions": null, - "allowUmdGlobalAccess": null, - "allowUnreachableCode": null, - "allowUnusedLabels": null, - "assumeChangesOnlyAffectDirectDependencies": null, - "alwaysStrict": null, - "baseUrl": "", - "build": null, - "checkJs": null, - "customConditions": null, - "composite": null, - "emitDeclarationOnly": null, - "emitBOM": null, - "emitDecoratorMetadata": null, - "downlevelIteration": null, - "declaration": null, - "declarationDir": "", - "declarationMap": null, - "disableSizeLimit": null, - "disableSourceOfProjectReferenceRedirect": null, - "disableSolutionSearching": null, - "disableReferencedProjectLoad": null, - "esModuleInterop": null, - "exactOptionalPropertyTypes": null, - "experimentalDecorators": null, - "forceConsistentCasingInFileNames": null, - "isolatedModules": null, - "isolatedDeclarations": null, - "ignoreDeprecations": "", - "importHelpers": null, - "inlineSourceMap": null, - "inlineSources": null, - "init": null, - "incremental": null, - "jsx": 0, - "jsxFactory": "", - "jsxFragmentFactory": "", - "jsxImportSource": "", - "keyofStringsOnly": null, - "lib": null, - "locale": "", - "mapRoot": "", - "module": 0, - "moduleResolution": 0, - "moduleSuffixes": null, - "moduleDetectionKind": 0, - "newLine": 0, - "noEmit": null, - "noCheck": null, - "noErrorTruncation": null, - "noFallthroughCasesInSwitch": null, - "noImplicitAny": null, - "noImplicitThis": null, - "noImplicitReturns": null, - "noEmitHelpers": null, - "noLib": null, - "noPropertyAccessFromIndexSignature": null, - "noUncheckedIndexedAccess": null, - "noEmitOnError": null, - "noUnusedLocals": null, - "noUnusedParameters": null, - "noResolve": null, - "noImplicitOverride": null, - "noUncheckedSideEffectImports": null, - "out": "", - "outDir": "", - "outFile": "", - "paths": null, - "preserveConstEnums": null, - "preserveSymlinks": null, - "project": "", - "resolveJsonModule": null, - "resolvePackageJsonExports": null, - "resolvePackageJsonImports": null, - "removeComments": null, - "rewriteRelativeImportExtensions": null, - "reactNamespace": "", - "rootDir": "", - "rootDirs": null, - "skipLibCheck": null, - "strict": null, - "strictBindCallApply": null, - "strictBuiltinIteratorReturn": null, - "strictFunctionTypes": null, - "strictNullChecks": null, - "strictPropertyInitialization": null, - "stripInternal": null, - "skipDefaultLibCheck": null, - "sourceMap": null, - "sourceRoot": "", - "suppressOutputPathCheck": null, - "target": 0, - "traceResolution": null, - "tsBuildInfoFile": "", - "typeRoots": null, - "types": null, - "useDefineForClassFields": null, - "useUnknownInCatchVariables": null, - "verbatimModuleSyntax": null, - "maxNodeModuleJsDepth": null, - "configFilePath": "/tsconfig.json", - "noDtsResolution": null, - "pathsBasePath": "", - "diagnostics": null, - "extendedDiagnostics": null, - "generateCpuProfile": "", - "generateTrace": "", - "listEmittedFiles": null, - "listFiles": null, - "explainFiles": null, - "listFilesOnly": null, - "noEmitForJsFiles": null, - "preserveWatchOutput": null, - "pretty": null, - "version": null, - "watch": null, - "showConfig": null, - "tscBuild": null + "configFilePath": "/tsconfig.json" } FileNames:: diff --git a/testdata/baselines/reference/config/tsconfigParsing/reports errors for wrong type option and invalid enum value with jsonSourceFile api.js b/testdata/baselines/reference/config/tsconfigParsing/reports errors for wrong type option and invalid enum value with jsonSourceFile api.js index 425998f942..10a64ebb70 100644 --- a/testdata/baselines/reference/config/tsconfigParsing/reports errors for wrong type option and invalid enum value with jsonSourceFile api.js +++ b/testdata/baselines/reference/config/tsconfigParsing/reports errors for wrong type option and invalid enum value with jsonSourceFile api.js @@ -15,128 +15,7 @@ Fs:: configFileName:: tsconfig.json CompilerOptions:: { - "allowJs": null, - "allowArbitraryExtensions": null, - "allowSyntheticDefaultImports": null, - "allowImportingTsExtensions": null, - "allowNonTsExtensions": null, - "allowUmdGlobalAccess": null, - "allowUnreachableCode": null, - "allowUnusedLabels": null, - "assumeChangesOnlyAffectDirectDependencies": null, - "alwaysStrict": null, - "baseUrl": "", - "build": null, - "checkJs": null, - "customConditions": null, - "composite": null, - "emitDeclarationOnly": null, - "emitBOM": null, - "emitDecoratorMetadata": null, - "downlevelIteration": null, - "declaration": null, - "declarationDir": "", - "declarationMap": null, - "disableSizeLimit": null, - "disableSourceOfProjectReferenceRedirect": null, - "disableSolutionSearching": null, - "disableReferencedProjectLoad": null, - "esModuleInterop": null, - "exactOptionalPropertyTypes": null, - "experimentalDecorators": null, - "forceConsistentCasingInFileNames": null, - "isolatedModules": null, - "isolatedDeclarations": null, - "ignoreDeprecations": "", - "importHelpers": null, - "inlineSourceMap": null, - "inlineSources": null, - "init": null, - "incremental": null, - "jsx": 0, - "jsxFactory": "", - "jsxFragmentFactory": "", - "jsxImportSource": "", - "keyofStringsOnly": null, - "lib": null, - "locale": "", - "mapRoot": "", - "module": 0, - "moduleResolution": 0, - "moduleSuffixes": null, - "moduleDetectionKind": 0, - "newLine": 0, - "noEmit": null, - "noCheck": null, - "noErrorTruncation": null, - "noFallthroughCasesInSwitch": null, - "noImplicitAny": null, - "noImplicitThis": null, - "noImplicitReturns": null, - "noEmitHelpers": null, - "noLib": null, - "noPropertyAccessFromIndexSignature": null, - "noUncheckedIndexedAccess": null, - "noEmitOnError": null, - "noUnusedLocals": null, - "noUnusedParameters": null, - "noResolve": null, - "noImplicitOverride": null, - "noUncheckedSideEffectImports": null, - "out": "", - "outDir": "", - "outFile": "", - "paths": null, - "preserveConstEnums": null, - "preserveSymlinks": null, - "project": "", - "resolveJsonModule": null, - "resolvePackageJsonExports": null, - "resolvePackageJsonImports": null, - "removeComments": null, - "rewriteRelativeImportExtensions": null, - "reactNamespace": "", - "rootDir": "", - "rootDirs": null, - "skipLibCheck": null, - "strict": null, - "strictBindCallApply": null, - "strictBuiltinIteratorReturn": null, - "strictFunctionTypes": null, - "strictNullChecks": null, - "strictPropertyInitialization": null, - "stripInternal": null, - "skipDefaultLibCheck": null, - "sourceMap": null, - "sourceRoot": "", - "suppressOutputPathCheck": null, - "target": 0, - "traceResolution": null, - "tsBuildInfoFile": "", - "typeRoots": null, - "types": null, - "useDefineForClassFields": null, - "useUnknownInCatchVariables": null, - "verbatimModuleSyntax": null, - "maxNodeModuleJsDepth": null, - "configFilePath": "/tsconfig.json", - "noDtsResolution": null, - "pathsBasePath": "", - "diagnostics": null, - "extendedDiagnostics": null, - "generateCpuProfile": "", - "generateTrace": "", - "listEmittedFiles": null, - "listFiles": null, - "explainFiles": null, - "listFilesOnly": null, - "noEmitForJsFiles": null, - "preserveWatchOutput": null, - "pretty": null, - "version": null, - "watch": null, - "showConfig": null, - "tscBuild": null + "configFilePath": "/tsconfig.json" } FileNames::