Files
tsgo/testdata/baselines/reference/tsbuild/configFileErrors/reports-invalid-project-reference-fields.js

72 lines
2.4 KiB
TypeScript

currentDirectory::/home/src/workspaces/project
useCaseSensitiveFileNames::true
Input::
//// [/home/src/workspaces/project/index.ts] *new*
export const x = 10;
//// [/home/src/workspaces/project/tsconfig.json] *new*
{
"compilerOptions": {
"composite": true
},
"files": ["index.ts"],
"references": [
{ "path": true },
{ "circular": true },
{ "path": "./utils", "circular": "yes" },
{ "path": "" },
{ "path": "./valid", "circular": true }
]
}
//// [/home/src/workspaces/project/utils/index.ts] *new*
export const y = 10;
//// [/home/src/workspaces/project/utils/tsconfig.json] *new*
{
"compilerOptions": {
"composite": true
},
"files": ["index.ts"]
}
//// [/home/src/workspaces/project/valid/index.ts] *new*
export const z = 10;
//// [/home/src/workspaces/project/valid/tsconfig.json] *new*
{
"compilerOptions": {
"composite": true
},
"files": ["index.ts"]
}
tsgo --b --dry
ExitStatus:: DiagnosticsPresent_OutputsSkipped
Output::
[HH:MM:SS AM] A non-dry build would build project '/home/src/workspaces/project/utils/tsconfig.json'
[HH:MM:SS AM] A non-dry build would build project '/home/src/workspaces/project/valid/tsconfig.json'
[HH:MM:SS AM] A non-dry build would build project '/home/src/workspaces/project/tsconfig.json'
tsconfig.json:7:19 - error TS5024: Compiler option 'reference.path' requires a value of type string.
7 { "path": true },
   ~~~~
tsconfig.json:8:9 - error TS5024: Compiler option 'reference.path' requires a value of type string.
8 { "circular": true },
   ~~~~~~~~~~~~~~~~~~~~
tsconfig.json:9:42 - error TS5024: Compiler option 'reference.circular' requires a value of type boolean.
9 { "path": "./utils", "circular": "yes" },
   ~~~~~
tsconfig.json:10:19 - error TS18051: Compiler option 'reference.path' cannot be given an empty string.
10 { "path": "" },
   ~~
Found 4 errors in the same file, starting at: tsconfig.json:7