diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1eeda2a95..a8c82e1a1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,6 +41,16 @@ jobs: - run: npm run lint:static-site - run: node ./scripts/check-resource-index-match.js + type-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: 'package.json' + - run: npm ci + - run: npm run type-check:ci + # Build into Heroku slug so we can deploy the same build that we test. build: runs-on: ubuntu-latest diff --git a/package.json b/package.json index 6de3d7c74..ee7baefd4 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,8 @@ "lint": "npm run lint:server", "lint:server": "DEBUG=eslint:cli-engine npx eslint --max-warnings=0 --ext .js,.jsx .", "lint:static-site": "cd static-site && DEBUG=eslint:cli-engine npx eslint --max-warnings=0 --ext .js,.jsx,.ts,.tsx .", + "type-check": "cd static-site && tsc", + "type-check:ci": "npm run build && cd static-site && tsc", "server": "node server.js", "groups": "node server.js --app ./src/groupsApp.js", "start": "npm run server", diff --git a/static-site/types.d.ts b/static-site/types.d.ts index 38acd62a2..3041bb4ee 100644 --- a/static-site/types.d.ts +++ b/static-site/types.d.ts @@ -1,23 +1,3 @@ -declare module "*.css" { - const value: unknown; - export default value; -} - -declare module "*.jpg" { - const value: { src: string }; - export default value; -} - -declare module "*.png" { - const value: { src: string }; - export default value; -} - -declare module "*.svg" { - const value: { src: string }; - export default value; -} - declare module "*.yaml" { // Actual type should be set upon import via type assertion. const contents: unknown;