It is easy for the TypeScript files to be misconfigured due to requirements that aren't obvious.
At the project level, the following should hold true:
In tsconfig.json, references should cover all public workspace packages, and all paths should point to valid files and end with /tsconfig.json[note: this is not the case now but we can add it for consistency with the next rule]
In tsconfig.build.json, references should match references in tsconfig.json except that all paths should end with /tsconfig.build.json and point to valid files.
For each public workspace package, the following should hold true:
tsconfig.json should be present and:
extends should be "../../tsconfig.packages.json"
compilerOptions.baseUrl should be "./"
all paths in references (if present) should point to valid files and end with /tsconfig.json[note: this is not the case now but we can add it for consistency with the next rule]
include should include "../../types" and "./src"
tsconfig.build.json should be present and:
extends should be "../../tsconfig.packages.build.json"
compilerOptions.baseUrl should be "./"
compilerOptions.dist should be "./dist"
compilerOptions.rootDir should be "./src"
all paths in references (if present) should match those in tsconfig.json except they should end with /tsconfig.build.json and should be valid files
It is easy for the TypeScript files to be misconfigured due to requirements that aren't obvious.
At the project level, the following should hold true:
tsconfig.json
,references
should cover all public workspace packages, and all paths should point to valid files and end with/tsconfig.json
[note: this is not the case now but we can add it for consistency with the next rule]tsconfig.build.json
,references
should matchreferences
intsconfig.json
except that all paths should end with/tsconfig.build.json
and point to valid files.For each public workspace package, the following should hold true:
tsconfig.json
should be present and:extends
should be "../../tsconfig.packages.json"compilerOptions.baseUrl
should be "./"references
(if present) should point to valid files and end with/tsconfig.json
[note: this is not the case now but we can add it for consistency with the next rule]include
should include "../../types" and "./src"tsconfig.build.json
should be present and:extends
should be "../../tsconfig.packages.build.json"compilerOptions.baseUrl
should be "./"compilerOptions.dist
should be "./dist"compilerOptions.rootDir
should be "./src"references
(if present) should match those intsconfig.json
except they should end with/tsconfig.build.json
and should be valid filesinclude
should include "../../types" and "./src"