wellcomecollection / wellcomecollection.org

🪟 Wellcome Collection's website and services that support it
https://wellcomecollection.org
MIT License
37 stars 5 forks source link

Run Type checks as a Github action and use one aligned config. #10844

Open rcantin-w opened 2 months ago

rcantin-w commented 2 months ago

We should run type checks at some point (PRs? builds?) to ensure we're in-line at all times. This came up because our mocks tend to get very out of date; an example is Prismic's Image type where they added two new required fields. Most mocks started showing errors, but as they're never interacted with, they're not getting updated.

We should add a type check, with a PR that fixes all flagged issues. Then, if/when it happens again, it has to be addressed right away and we're less in danger of falling behind.

Github action? https://github.com/marketplace/actions/typescript-compiler Git hook? https://github.com/guardian/pressreader/blob/main/scripts/setup#L9

rcantin-w commented 4 days ago

Audit of all the different tsconfig settings in all subrepos of the shared workspace (cardigan, common, content, identity, prismic-model and toggles). Aiming to determine what we want moving forward.