You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Missed detection: unchecked as type cast in JSON response parsing #10
lib/utils/geocoding/photon.ts:96 — as PhotonResponse
lib/utils/geocoding.ts:212 — as { type: string; features: Array<{...}> }
Expected Behavior
KarpeSlop should flag as T casts where T is a complex object type (interface or inline object literal) applied to response.json() or fetch().json() results, since these are inherently unknown at runtime.
Suggested Fix
Add a detection rule for as casts where:
The LHS is await response.json() or similar json() call
The RHS is an interface or inline object literal type
This pattern is a common AI-generated anti-pattern — it creates a false sense of type safety.
Proposed KarpeSlop Rule
AXE-3 (Type Safety): unsafe-json-cast — detect as T casts on json() return values where T is not unknown.
Activity
CodeDeficient commentedon Jun 10, 2026
Fixed in v1.0.26 (PR #15 + PR #19)