Skip to content

refactor: improve type safety across core modules by replacing any wi…#247

Open
oyinade247 wants to merge 1 commit into
Neurowealth:mainfrom
oyinade247:Enable-TypeScript-no-explicit-any-ESLint-rule-across-the-codebase
Open

refactor: improve type safety across core modules by replacing any wi…#247
oyinade247 wants to merge 1 commit into
Neurowealth:mainfrom
oyinade247:Enable-TypeScript-no-explicit-any-ESLint-rule-across-the-codebase

Conversation

@oyinade247

Copy link
Copy Markdown

Closes #220

PR: Enable @typescript-eslint/no-explicit-any rule
Summary
Enabled the @typescript-eslint/no-explicit-any rule at error level and resolved all 93 violations across 22 source files. Every any was replaced with a proper type — no eslint-disable comments were introduced.
Changes
Config (eslint.config.mjs):

  • @typescript-eslint/no-explicit-any: 'off' → 'error'
    Prisma schema (prisma/schema.prisma):
  • Added tokenPrefix String? to AdminApiKey model (was being used with as any)
  • Added SCAN to AgentAction enum (was being used but missing from schema)
  • Regenerated Prisma client
    Type fixes by category:
    Pattern
    as any on Prisma calls
    Record<string, any>
    (item: any) in callbacks
    Promise return
    err: any in handlers
    ZodSchema
    tx: any = db (Prisma tx)
    req: any, res: any (rate limiter)
    config.env as any
    query: any (pagination)
    Verification
  • npm run lint:types (tsc) — passes
  • npm run lint:style (eslint) — passes, zero no-explicit-any violations
  • No eslint-disable comments found in src/
    ▣ Build · Big Pickle · 6.7s

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@oyinade247 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Enable TypeScript no-explicit-any ESLint rule across the codebase

1 participant