Skip to content

Restore TypeScript type checking during builds#212

Closed
javierpr0 wants to merge 1 commit into
simplifaisoul:masterfrom
javierpr0:fix/restore-ts-build-checks
Closed

Restore TypeScript type checking during builds#212
javierpr0 wants to merge 1 commit into
simplifaisoul:masterfrom
javierpr0:fix/restore-ts-build-checks

Conversation

@javierpr0

Copy link
Copy Markdown
Contributor

Summary

next.config.ts disabled build-time type checking through typescript.ignoreBuildErrors: true. With that flag set, next build skips type validation entirely, so type errors can be merged and deployed without anything failing. This removes the flag and fixes the two pre-existing type errors it was masking.

Changes

  • next.config.ts — remove typescript.ignoreBuildErrors. next build now fails on type errors instead of ignoring them.
  • src/app/page.tsx<OsintPanel> was receiving theme and setTheme, props the component neither declares nor uses, so they were silently discarded. Removed them from the call site. LayerPanel, which does accept those props, is left unchanged.
  • src/lib/sdk/PolybolosClient.ts — the toGeoJSON return type referenced the UMD global GeoJSON.FeatureCollection, which TypeScript does not expose inside an ES module (it only resolved because the build never type-checked). Replaced it with an explicit import type { FeatureCollection } from "geojson".
  • package.json / package-lock.json — add @types/geojson as a direct devDependency. It was already in the dependency tree transitively via maplibre-gl; promoting it to a direct dependency makes the type import resolvable and keeps the build reproducible.

Rationale

Turning off type checking at build time removes the main guarantee TypeScript provides in CI: prop, type, and API-contract regressions ship without warning. The two errors uncovered here are concrete proof the flag was hiding real problems — an unused prop pair and a type reference that only compiled because nothing validated it.

Verification

  • npx tsc --noEmit — 0 errors
  • next build — compiles successfully, all 42 routes generated

No runtime behavior changes: the removed props were already ignored by the receiving component, and the PolybolosClient change is type-only.

next.config.ts disabled type checking at build time through
typescript.ignoreBuildErrors, so type errors could reach production
without failing the build. Remove the flag so `next build` fails on
type errors again.

Removing it exposed two pre-existing type errors, fixed here:

- src/app/page.tsx passed theme/setTheme props to <OsintPanel>, a
  component that does not declare or use them. Dropped the unused props
  from the call site. LayerPanel, which does use them, is unchanged.
- src/lib/sdk/PolybolosClient.ts annotated a return value with the UMD
  global GeoJSON.FeatureCollection, which TypeScript does not expose
  inside an ES module. Import FeatureCollection from "geojson" and add
  @types/geojson as a direct devDependency; it was previously present
  only transitively through maplibre-gl.

Verified with tsc --noEmit (0 errors) and a full production build.
@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

@javierpr0 is attempting to deploy a commit to the Amanda's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants