Summary
next.config.mjs sets typescript: { ignoreBuildErrors: true }, which silently suppresses all TypeScript compilation errors during production builds. The codebase makes widespread use of any types across API routes. The result is that type-unsafe code is compiled and deployed to production without any indication that type checks failed. This defeats the entire purpose of using TypeScript and allows entire classes of runtime errors to reach production undetected.
Evidence
File: next.config.mjs:
const nextConfig = {
typescript: {
ignoreBuildErrors: true, // ← ALL TypeScript errors silently ignored in production
},
Examples of unsafe patterns that would normally surface type errors, visible across the codebase:
src/app/api/signals/route.ts:
allSignals.sort((a: any, b: any) => { // 'any' defeats type safety on sort
if (a.iranRelevance !== b.iranRelevance) { ... }
src/app/api/alerts/route.ts:
export async function POST(request: Request) {
const { action, ...data } = await request.json(); // data is 'any', no schema validation
const signals = data.signals || []; // no type check on signals array
for (const signal of signals) { // signal is 'any', no shape validation
const text = `${signal.title} ${signal.summary || ''}`.toLowerCase();
src/app/api/brief/route.ts:
const { signals } = await signalsRes.json() as { signals: Signal[] };
// cast without runtime validation — if JSON shape differs, runtime error
The combination of ignoreBuildErrors: true and pervasive any means:
- Structural mismatches between API response shapes and consuming code are never caught.
- Refactoring any type causes silent downstream breakage.
- The CI/CD build green-lights broken TypeScript without warning.
Why this matters
TypeScript's value is entirely in its build-time guarantees. Disabling build errors means:
- Developer changes that break type contracts deploy silently to production.
- Any runtime crash from a type mismatch has no pre-production signal.
npm run build completing successfully is meaningless as a quality gate.
- IDEs and editors still show errors, but they are ignored at build time — the flag actively trains developers to dismiss type errors.
Root cause
ignoreBuildErrors was added to make the build pass despite pre-existing type errors, rather than fixing the errors. This is a common vibe-coded shortcut that permanently disables type safety.
Recommended fix
- Remove
typescript: { ignoreBuildErrors: true } from next.config.mjs.
- Run
npm run build and address all type errors that surface.
- Replace all
any typed function parameters and return values in API routes with explicit interfaces.
- Add
strict: true to tsconfig.json and address remaining strict-mode errors.
- Add a CI step that fails the build on type errors:
npx tsc --noEmit.
Acceptance criteria
Suggested labels
bug
Priority
P0
Severity
High — TypeScript type safety entirely disabled in production builds; type errors deploy silently.
Confidence
Confirmed — flag is present in next.config.mjs in current HEAD.
This issue was filed as part of the AI Slop Intelligence Dashboard Awareness Program.
Repo under review: https://github.com/OpenScanAI/GlobeNewsLive
Programme: https://labs.jamessawyer.co.uk/ai-slop-intelligence-dashboards/
Summary
next.config.mjssetstypescript: { ignoreBuildErrors: true }, which silently suppresses all TypeScript compilation errors during production builds. The codebase makes widespread use ofanytypes across API routes. The result is that type-unsafe code is compiled and deployed to production without any indication that type checks failed. This defeats the entire purpose of using TypeScript and allows entire classes of runtime errors to reach production undetected.Evidence
File:
next.config.mjs:Examples of unsafe patterns that would normally surface type errors, visible across the codebase:
src/app/api/signals/route.ts:src/app/api/alerts/route.ts:src/app/api/brief/route.ts:The combination of
ignoreBuildErrors: trueand pervasiveanymeans:Why this matters
TypeScript's value is entirely in its build-time guarantees. Disabling build errors means:
npm run buildcompleting successfully is meaningless as a quality gate.Root cause
ignoreBuildErrorswas added to make the build pass despite pre-existing type errors, rather than fixing the errors. This is a common vibe-coded shortcut that permanently disables type safety.Recommended fix
typescript: { ignoreBuildErrors: true }fromnext.config.mjs.npm run buildand address all type errors that surface.anytyped function parameters and return values in API routes with explicit interfaces.strict: truetotsconfig.jsonand address remaining strict-mode errors.npx tsc --noEmit.Acceptance criteria
ignoreBuildErrors: trueremoved fromnext.config.mjs.npm run buildcompletes with zero TypeScript errors.anyannotations remain in API route handlers.Suggested labels
bug
Priority
P0
Severity
High — TypeScript type safety entirely disabled in production builds; type errors deploy silently.
Confidence
Confirmed — flag is present in
next.config.mjsin current HEAD.