Summary
ESLint reports 45+ no-explicit-any errors scattered across the codebase. The worst offenders:
useNostr.ts — 17 instances (NDK signer wrappers, catch blocks, event types)
App.tsx — 5 instances (AppRoutes props, event handlers)
signer.ts — typed loosely
nostr.ts — event building/publishing
androidSigner.ts — intent handling
upload.ts — response handling
- Various catch blocks using
catch (e: any) instead of unknown
Approach
- Define proper interfaces for Nostr events, NDK signers, relay results
- Use
nostr-tools built-in types where available
- Replace
catch (e: any) with catch (e: unknown) + type narrowing
- Create a
types/ directory with shared interfaces if needed
- Extend
src/types/nostr.ts with missing types
Acceptance Criteria
Summary
ESLint reports 45+
no-explicit-anyerrors scattered across the codebase. The worst offenders:useNostr.ts— 17 instances (NDK signer wrappers, catch blocks, event types)App.tsx— 5 instances (AppRoutes props, event handlers)signer.ts— typed looselynostr.ts— event building/publishingandroidSigner.ts— intent handlingupload.ts— response handlingcatch (e: any)instead ofunknownApproach
nostr-toolsbuilt-in types where availablecatch (e: any)withcatch (e: unknown)+ type narrowingtypes/directory with shared interfaces if neededsrc/types/nostr.tswith missing typesAcceptance Criteria
@typescript-eslint/no-explicit-anyerrors