Skip to content

[Backend][Tech-debt] ~60 @ts-ignore comments defeat type safety across the backend #469

Description

@Penielka

Overview

The backend uses @ts-ignore extensively — backend/src/index.ts alone has ~20 of them (imports of services, middleware, and route modules), with more in routes/assignmentRoutes.ts, routes/smartWalletRoutes.ts, routes/secureCommRoutes.ts, middleware/upload.ts, and elsewhere. Many suppress missing module errors (// @ts-ignore - controller module not yet implemented), which is exactly how dead routes (vrf, cross-protocol-bridge) got past CI. @ts-ignore hides real type errors and makes the type checker a no-op for whole files.

Evidence

  • backend/src/index.ts — ~20 @ts-ignore (lines 30–112)
  • backend/src/routes/assignmentRoutes.ts — 9 @ts-ignore
  • backend/src/routes/smartWalletRoutes.ts — 8 @ts-ignore

Acceptance Criteria

  • Replace @ts-ignore with real types; where a module is genuinely missing, create it (not suppress it)
  • Add an ESLint rule (@typescript-eslint/ban-ts-comment) that fails CI on new @ts-ignore
  • Audit remaining suppressions and document each one

Files to Modify

  • backend/src/index.ts
  • backend/src/routes/*
  • backend/.eslintrc.json

Priority: Medium

Activity

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

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third CampaignbackendBackend API issuestech-debt

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions