mirror of
https://github.com/pezkuwichain/pezkuwi-telegram-miniapp.git
synced 2026-07-24 19:55:42 +00:00
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:
+3
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user