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
This commit is contained in:
2026-10-01 22:28:18 +02:00
parent e17231d474
commit 90ebb27a7c
2 changed files with 3 additions and 1 deletions
Vendored
+2
View File
@@ -1,3 +1,5 @@
/// <reference types="next/image-types/global" />
// Use type safe message keys with `next-intl` // Use type safe message keys with `next-intl`
type Messages = typeof import("./src/messages/fr.json"); type Messages = typeof import("./src/messages/fr.json");
+1 -1
View File
@@ -10,7 +10,7 @@
"build": "next build --webpack", "build": "next build --webpack",
"start": "next start", "start": "next start",
"lint": "oxlint", "lint": "oxlint",
"typeCheck": "tsc -p ./tsconfig.json", "typeCheck": "tsc -p ./tsconfig.json --incremental false",
"postinstall": "patch-package", "postinstall": "patch-package",
"format": "oxfmt --check", "format": "oxfmt --check",
"format:fix": "oxfmt", "format:fix": "oxfmt",