diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 6916dbac..bfbc7899 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -26,6 +26,10 @@ jobs: env: TARGET: 'dev' + - name: 'Typecheck' + run: make typecheck + continue-on-error: true + - name: 'Lint' run: make lint diff --git a/Makefile b/Makefile index 0357bf4c..d46f422d 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ .DEFAULT_GOAL: help -.PHONY: help build run dev prod start logs stop wait-healthy lint format test integration-test smoke-test +.PHONY: help build run dev prod start logs stop wait-healthy typecheck lint format test integration-test smoke-test ifeq (${TARGET},) TARGET := dev @@ -46,6 +46,10 @@ endif wait-healthy: ## Wait for the app to be healthy @.scripts/wait-healthy.sh prereview +typecheck: export TARGET = dev +typecheck: build ## Run the typechecker + @${DOCKER_COMPOSE} run --rm --no-deps --entrypoint "npm run" prereview typecheck + lint: export TARGET = dev lint: build ## Run the linter @${DOCKER_COMPOSE} run --rm --no-deps --entrypoint "npm run" prereview lint diff --git a/package.json b/package.json index 840cb9ec..45898267 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "format": "prettier --ignore-unknown --check '**'", "lint": "eslint --ext .js,.jsx,.ts,.tsx .", "test": "jest", + "typecheck": "tsc --noEmit --project tsconfig.dev.json", "build": "rimraf dist && npm run build:scripts && npm run build:backend && npm run build:hooks && npm run build:frontend", "build:dev": "rimraf dist && npm run build:scripts && npm run build:backend:dev && npm run build:hooks && npm run build:frontend:dev", "build:backend": "parcel build --target=backend --no-optimize src/backend/index.ts && npm run build:templates", diff --git a/tsconfig.json b/tsconfig.json index 17c7cce0..a27474d4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,7 @@ "module": "commonjs", "declaration": true, "isolatedModules": true, - "noImplicitAny": false, + "strict": true, "removeComments": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true,