-
Notifications
You must be signed in to change notification settings - Fork 512
Description
A lot of type check scripts are structured as:
"check:types": "(cd ../../.. && tsgo --project packages/@sanity/mutator/tsconfig.lib.json --erasableSyntaxOnly)",
This is not ideal, as it means the IDE uses tsconfig.json when surfacing errors, so if there are type errors in tests files and such they are not flagged on PRs.
"check:types": "(cd ../../.. && tsgo",
would be better.
Some cases also uses tsconfig.check.json, that's not ideal either. Instead, CI tasks that check types should remember to run pnpm build first so that dependent workspaces build their .d.ts files before type checking dependants downstream.
All check:types should use tsconfig.json, existing type errors should be fixed if they are easy and straightforward to fix, otherwise adding @ts-expect-error comments on legacy code is fine, so it can be handled another day.
We don't check types in ./examples atm, that folder can be ignored. Some workspaces in dev/* are missing check:types, add them.