diff --git a/.github/workflows/pr-quality-gate-js.yml b/.github/workflows/pr-quality-gate-js.yml index 217c4f9..9253c04 100644 --- a/.github/workflows/pr-quality-gate-js.yml +++ b/.github/workflows/pr-quality-gate-js.yml @@ -59,6 +59,9 @@ jobs: - name: Install dependencies run: yarn install --immutable + - name: Typecheck + run: yarn typecheck + - name: Run Code Linter run: yarn lint diff --git a/js/desktop/forge.config.ts b/js/desktop/forge.config.ts index d0af626..2294ee7 100644 --- a/js/desktop/forge.config.ts +++ b/js/desktop/forge.config.ts @@ -6,7 +6,6 @@ import { MakerRpm } from '@electron-forge/maker-rpm'; import { VitePlugin } from '@electron-forge/plugin-vite'; import { FusesPlugin } from '@electron-forge/plugin-fuses'; import { FuseV1Options, FuseVersion } from '@electron/fuses'; -import type { SignToolOptions } from '@electron/windows-sign'; // Windows code signing via Azure Trusted Signing. Dormant unless the workflow // provisions the dlib + metadata file and exports these env vars, so local @@ -17,7 +16,7 @@ import type { SignToolOptions } from '@electron/windows-sign'; const windowsSign = process.env.AZURE_METADATA_JSON_PATH ? { debug: true, signToolPath: process.env.SIGNTOOL_PATH, - hashes: ['sha256'] as SignToolOptions['hashes'], + hashes: ['sha256'] as any, // eslint-disable-line @typescript-eslint/no-explicit-any timestampServer: 'http://timestamp.acs.microsoft.com', signWithParams: [ '/v', diff --git a/js/desktop/package.json b/js/desktop/package.json index d5ce88d..17f4c6f 100644 --- a/js/desktop/package.json +++ b/js/desktop/package.json @@ -17,7 +17,7 @@ "lint": "eslint --ext .ts,.tsx .", "format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,css,md}\"", "format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,json,css,md}\"", - "compile": "npx tsc --noEmit 2>&1 | grep '^src/'", + "typecheck": "npx tsc --noEmit", "web:dev": "cross-env APP_ENV=dev vite --config vite.web.config.mts", "web:build": "cross-env APP_ENV=prod vite build --config vite.web.config.mts", "web:build:ci": "vite build --config vite.web.config.mts", diff --git a/js/desktop/tsconfig.json b/js/desktop/tsconfig.json index 8e0caad..ccb5f77 100644 --- a/js/desktop/tsconfig.json +++ b/js/desktop/tsconfig.json @@ -1,14 +1,14 @@ { "compilerOptions": { "target": "ESNext", - "module": "commonjs", + "module": "ESNext", "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, "noImplicitAny": true, "sourceMap": true, "outDir": "dist", - "moduleResolution": "node", + "moduleResolution": "bundler", "resolveJsonModule": true, "jsx": "react-jsx", "strict": true,