Skip to content

Enable TypeScript noImplicitAny and eslint no-explicit-any #224

Description

@meshackyaro

Description

tsconfig.json sets "noImplicitAny": false, and .eslintrc.js sets "@typescript-eslint/no-explicit-any": "off". Both are currently used in real code: src/monitoring/health.controller.ts (getHealth(): Promise<any>), src/event-ingestion/event-processor.service.ts (value: any), src/auth/auth.guard.ts (handleRequest(err: any, user: any, info: any)), src/common/rate-limit/rate-limit.guard.ts (getIdentities(request: any), extractWallet(request: any), getRoute(request: any)), src/event-ingestion/event-ingestion.service.ts (parseEventValue(value: any): any, parseTopic(topic: any): string), src/stellar/soroban.helper.ts (isSimulationError(result: any)), and src/stellar/stellar.service.ts (account.balances.find((b: any) => ...)- ). Loosening both compiler and lint checks means real type errors in exactly the kind of request-parsing/RPC-response-parsing code that benefits most from static typing can slip through silently.

Component

Backend

Difficulty

🔴 Hard

Tasks

  • Flip noImplicitAny to true in tsconfig.json and @typescript-eslint/no-explicit-any to "warn" (or "error") in .eslintrc.js
  • Work through the resulting compiler/lint errors, replacing any with proper types or interfaces (e.g. typed Express Request, Soroban SDK response types) file by file
  • Land the change incrementally if needed (e.g. per-directory // eslint-disable suppressions with follow-up tickets) rather than requiring one giant PR

Acceptance Criteria

  • npx tsc --noEmit and npm run lint:check both pass with noImplicitAny: true and no-explicit-any enabled
  • No behavior changes — this is a types-only cleanup verified by the existing test suite continuing to pass

Estimated Time

3-4 days

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions