Skip to content

Type check everything #11939

@stipsan

Description

@stipsan

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions