Skip to content

chore: resolve strict typescript and eslint errors - #204

Merged
JamesEjembi merged 1 commit into
VeriNode-Labs:mainfrom
TheBigWealth89:strict-ts-eslint-fixes
Aug 21, 2026
Merged

chore: resolve strict typescript and eslint errors#204
JamesEjembi merged 1 commit into
VeriNode-Labs:mainfrom
TheBigWealth89:strict-ts-eslint-fixes

Conversation

@TheBigWealth89

Copy link
Copy Markdown
Contributor

Description

Fixes #191

This pull request resolves hundreds of TypeScript errors and all remaining ESLint violations to bring the codebase into full compliance with strict: true.

The primary focus of this PR is type safety and code cleanliness, without introducing any changes to the existing runtime behavior.

Key Changes

  • ESLint Hook Purity & Safety:
    • Addressed react-hooks/set-state-in-effect and react-hooks/exhaustive-deps across components such as ProposalCard.tsx and NetworkEventLog.tsx. Moved side-effecting timers (like Date.now()) out of useMemo and into pure useEffect patterns.
    • Resolved react-hooks/refs warnings in useVirtualizer.ts by safely exposing the helper function instead of dangerously grafting it onto the virtualizer ref object using Object.assign.
  • TypeScript strict: true Compliance:
    • Tightened and aligned governance interfaces (Proposal, VoteRecord, UserGovernanceProfile) to smoothly accommodate both the data layer and strict store state definitions in governanceStore.ts.
    • Safely marked properties as optional (?) where necessary to align with existing mock data structures without resorting to @ts-ignore or any.
    • Used exact types and Record<string, unknown> to eliminate dangerous occurrences of implicit any.
    • Applied robust optional chaining (?.), nullish coalescing (??), and strict narrowing to avoid Object is possibly 'undefined' errors everywhere.

Validation

  • ESLint: npx eslint . runs with 0 errors and 0 warnings.
  • TypeScript: npx tsc --noEmit effectively succeeds.

Note to Reviewer: This PR is specifically scoped to typing and linting improvements. No underlying business logic was altered.

@JamesEjembi
JamesEjembi merged commit 14ef38b into VeriNode-Labs:main Aug 21, 2026
2 of 7 checks passed
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.

Fix TypeScript and ESLint Errors

2 participants