Restore TypeScript type checking during builds#212
Closed
javierpr0 wants to merge 1 commit into
Closed
Conversation
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.
|
@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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
next.config.tsdisabled build-time type checking throughtypescript.ignoreBuildErrors: true. With that flag set,next buildskips 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
typescript.ignoreBuildErrors.next buildnow fails on type errors instead of ignoring them.<OsintPanel>was receivingthemeandsetTheme, 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.toGeoJSONreturn type referenced the UMD globalGeoJSON.FeatureCollection, which TypeScript does not expose inside an ES module (it only resolved because the build never type-checked). Replaced it with an explicitimport type { FeatureCollection } from "geojson".@types/geojsonas a direct devDependency. It was already in the dependency tree transitively viamaplibre-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 errorsnext build— compiles successfully, all 42 routes generatedNo runtime behavior changes: the removed props were already ignored by the receiving component, and the
PolybolosClientchange is type-only.