chore: eliminate all ESLint warnings, enforce --max-warnings 0 (#5)

Behavior-preserving lint cleanup of the 30 pre-existing warnings, fixed
by category (no blanket suppression):
- no-explicit-any (19): precise local types / ApiPromise for Substrate
  dynamic queries + 'as unknown as' casts (same pattern as TokensCard).
- no-console (4): dev-gated (import.meta.env.DEV) / warn; main.tsx prod
  console-suppression kept with a scoped documented disable.
- no-non-null-assertion (4): replaced '!' with explicit guards reusing
  the existing fallback/return paths.
- react-hooks/exhaustive-deps (3): missing dep is 't' (i18n) — adding it
  would re-fire blockchain fetches on language change; kept deps with a
  documented intentional disable.

Tighten the lint gate from --max-warnings 30 to 0 so no new warnings can
land. Verified: tsc 0 errors, eslint --max-warnings 0 clean, vite build ok.
This commit is contained in:
2026-06-14 09:24:00 -07:00
committed by GitHub
parent 97e5723aa5
commit 75114e7cb1
11 changed files with 199 additions and 93 deletions
+3 -1
View File
@@ -73,7 +73,9 @@ export async function getPendingReferral(api: ApiPromise, address: string): Prom
try {
// Check if referral pallet exists
if (!isReferralPalletAvailable(api)) {
console.log('Referral pallet not available on this chain');
if (import.meta.env.DEV) {
console.warn('Referral pallet not available on this chain');
}
return null;
}