This repository has been archived by the owner on Mar 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 423
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Force fork-ts-checker to watch all TS files in the repo
There is an issue with fork-ts-checker (or perhaps we are misusing it) such that it does not re-typecheck the correct files when a change is made in the app, most notably for files that only export types. (TypeStrong/fork-ts-checker-webpack-plugin#611) This change forces it to look at these files in our package source directories rather than the symlinks in node_modules created by yarn workspaces. Now they are correctly watched and new type errors show up when a type-only file is edited. fix build error fix yarn.lock Move base tsconfig changes to desktop tsconfigs
- Loading branch information
Showing
5 changed files
with
87 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,24 @@ | ||
{ | ||
"extends": "@foxglove/tsconfig/tsconfig.base.json", | ||
"include": ["./**/*"], | ||
"include": [ | ||
"./**/*", | ||
// These includes are added to ensure that fork-ts-checker correctly typechecks changed files: | ||
// https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/issues/611 | ||
"../../app/*.ts", | ||
"../../package.json", | ||
"../../packages/log/src/**/*" | ||
], | ||
"compilerOptions": { | ||
"noEmit": true | ||
"rootDir": "../..", | ||
"noEmit": true, | ||
|
||
// These paths are added to ensure that fork-ts-checker correctly typechecks changed files. | ||
// Using these resolutions will force TS to give us an error if we forgot to add these files to | ||
// one of our tsconfig "include"s. | ||
// https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/issues/611 | ||
"paths": { | ||
"@foxglove-studio/app/*": ["../../app/*"], | ||
"@foxglove/*": ["../../packages/*", "../../packages/foxglove/*"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,29 @@ | ||
{ | ||
"extends": "@foxglove/tsconfig/tsconfig.base.json", | ||
"include": ["./**/*", "../common/types.ts"], | ||
"include": [ | ||
"./**/*", | ||
"../common/types.ts", | ||
|
||
// These includes are added to ensure that fork-ts-checker correctly typechecks changed files: | ||
// https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/issues/611 | ||
"../../app/*.ts", | ||
"../../package.json", | ||
"../../packages/electron-socket/*", | ||
"../../packages/electron-socket/src/**/*", | ||
"../../packages/log/src/**/*" | ||
], | ||
"compilerOptions": { | ||
"rootDir": "../", | ||
"rootDir": "../..", | ||
"noEmit": true, | ||
"lib": ["dom", "es2020"] | ||
"lib": ["dom", "es2020"], | ||
|
||
// These paths are added to ensure that fork-ts-checker correctly typechecks changed files. | ||
// Using these resolutions will force TS to give us an error if we forgot to add these files to | ||
// one of our tsconfig "include"s. | ||
// https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/issues/611 | ||
"paths": { | ||
"@foxglove-studio/app/*": ["../../app/*"], | ||
"@foxglove/*": ["../../packages/*", "../../packages/foxglove/*"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,33 @@ | ||
{ | ||
"extends": "@foxglove/tsconfig/tsconfig.base.json", | ||
"include": ["./**/*", "../common/**/*"], | ||
"include": [ | ||
"./**/*", | ||
"../common/**/*", | ||
|
||
// These includes are added to ensure that fork-ts-checker correctly typechecks changed files: | ||
// https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/issues/611 | ||
"../../app/**/*", | ||
"../../app/**/*.json", | ||
"../../app/.storybook/**/*", | ||
"../../package.json", | ||
"../../packages/@foxglove/*/src/**/*", | ||
"../../packages/*/src/**/*", | ||
"../../packages/electron-socket/*", | ||
"../../packages/velodyne-cloud/src/**/*.json" | ||
], | ||
"compilerOptions": { | ||
"rootDir": "../", | ||
"rootDir": "../..", | ||
"noEmit": true, | ||
"jsx": "react-jsx", | ||
"lib": ["dom", "dom.iterable", "es2020"] | ||
"lib": ["dom", "dom.iterable", "es2020"], | ||
|
||
// These paths are added to ensure that fork-ts-checker correctly typechecks changed files. | ||
// Using these resolutions will force TS to give us an error if we forgot to add these files to | ||
// one of our tsconfig "include"s. | ||
// https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/issues/611 | ||
"paths": { | ||
"@foxglove-studio/app/*": ["../../app/*"], | ||
"@foxglove/*": ["../../packages/*", "../../packages/foxglove/*"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters