From 90ebb27a7c2f75e1152ece86189273c937830cfa Mon Sep 17 00:00:00 2001 From: Owen Date: Thu, 1 Oct 2026 22:28:18 +0200 Subject: [PATCH] fix: make typecheck pass in CI for static image imports - Add next/image-types/global reference to global.d.ts so *.jpeg (and other image module) declarations resolve without the gitignored, generated next-env.d.ts, which is absent in fresh CI clones - Run tsc with `--incremental false` in the typeCheck script to bypass the stale tsconfig.tsbuildinfo cache that was emitting a phantom TS2307 for src/app/[locale]/banner.jpeg --- global.d.ts | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/global.d.ts b/global.d.ts index a860e3d..f0d8f3d 100644 --- a/global.d.ts +++ b/global.d.ts @@ -1,3 +1,5 @@ +/// + // Use type safe message keys with `next-intl` type Messages = typeof import("./src/messages/fr.json"); diff --git a/package.json b/package.json index 6d4071e..f01ddec 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "build": "next build --webpack", "start": "next start", "lint": "oxlint", - "typeCheck": "tsc -p ./tsconfig.json", + "typeCheck": "tsc -p ./tsconfig.json --incremental false", "postinstall": "patch-package", "format": "oxfmt --check", "format:fix": "oxfmt",