diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml new file mode 100644 index 0000000..0fd6ff1 --- /dev/null +++ b/.github/workflows/typecheck.yml @@ -0,0 +1,41 @@ +name: Frontend TypeScript + +on: + push: + branches: + - develop + paths: + - "frontend/**" + - ".github/workflows/typecheck.yml" + pull_request: + paths: + - "frontend/**" + - ".github/workflows/typecheck.yml" + +concurrency: + group: typecheck-forms_pro-${{ github.event.number || github.sha }} + cancel-in-progress: true + +jobs: + typecheck: + name: TypeScript + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: "24" + cache: "yarn" + cache-dependency-path: frontend/yarn.lock + + - name: Install dependencies + working-directory: frontend + run: yarn install --frozen-lockfile + + - name: Type check + working-directory: frontend + run: yarn typecheck diff --git a/frontend/package.json b/frontend/package.json index ad40e75..8a0803a 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -8,6 +8,7 @@ "build": "vite build --base=/assets/forms_pro/frontend/ && yarn copy-html-entry", "preview": "vite preview", "lint": "biome check --write .", + "typecheck": "tsc --noEmit", "copy-html-entry": "cp ../forms_pro/public/frontend/index.html ../forms_pro/www/forms.html" }, "dependencies": { diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index 2a3e1e4..d424370 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -20,6 +20,7 @@ "@/*": ["src/*"] } }, + "skipLibCheck": true, "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", "src/main.ts"], "references": [{ "path": "./tsconfig.node.json" }] }