From 86c8de87b2818f7e4a7f992158d71f968599501f Mon Sep 17 00:00:00 2001 From: Nicolas Cantu Date: Wed, 7 Jan 2026 12:37:23 +0100 Subject: [PATCH] lint fix wip --- components/Nip95ConfigManager.tsx | 4 ++-- components/RelayManager.tsx | 4 ++-- hooks/useArticlePayment.ts | 2 +- lib/nostrAuth.ts | 2 +- lib/notifications.ts | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/components/Nip95ConfigManager.tsx b/components/Nip95ConfigManager.tsx index 4bedcf1..0729541 100644 --- a/components/Nip95ConfigManager.tsx +++ b/components/Nip95ConfigManager.tsx @@ -158,8 +158,8 @@ export function Nip95ConfigManager({ onConfigChange }: Nip95ConfigManagerProps): } try { - // Validate URL format - new URL(newUrl) + // Validate URL format - throws if invalid + void new URL(newUrl) await configStorage.addNip95Api(newUrl.trim(), false) setNewUrl('') setShowAddForm(false) diff --git a/components/RelayManager.tsx b/components/RelayManager.tsx index 89eb6ae..c6d3c35 100644 --- a/components/RelayManager.tsx +++ b/components/RelayManager.tsx @@ -189,8 +189,8 @@ export function RelayManager({ onConfigChange }: RelayManagerProps): React.React normalizedUrl = `wss://${normalizedUrl}` } - // Validate URL format - new URL(normalizedUrl) + // Validate URL format - throws if invalid + void new URL(normalizedUrl) await configStorage.addRelay(normalizedUrl, true) setNewUrl('') setShowAddForm(false) diff --git a/hooks/useArticlePayment.ts b/hooks/useArticlePayment.ts index 1af32f9..889fa85 100644 --- a/hooks/useArticlePayment.ts +++ b/hooks/useArticlePayment.ts @@ -78,7 +78,7 @@ export function useArticlePayment( setPaymentInvoice(paymentResult.invoice) setPaymentHash(paymentResult.paymentHash) setLoading(false) - checkPaymentStatus(paymentResult.paymentHash, pubkey) + void checkPaymentStatus(paymentResult.paymentHash, pubkey) } catch (e) { const errorMessage = e instanceof Error ? e.message : 'Failed to process payment' console.error('Payment processing error:', e) diff --git a/lib/nostrAuth.ts b/lib/nostrAuth.ts index 7cfb5d2..147949c 100644 --- a/lib/nostrAuth.ts +++ b/lib/nostrAuth.ts @@ -187,7 +187,7 @@ export class NostrAuthService { private setupMessageListener(): void { window.addEventListener('storage', (e: StorageEvent): void => { if (e.key === 'nostr_auth_state') { - this.loadStateFromStorage() + void this.loadStateFromStorage() } }) } diff --git a/lib/notifications.ts b/lib/notifications.ts index ca045b7..65d4305 100644 --- a/lib/notifications.ts +++ b/lib/notifications.ts @@ -149,7 +149,7 @@ export function markNotificationAsRead( const updated = notifications.map((n) => (n.id === notificationId ? { ...n, read: true } : n) ) - saveNotifications(userPubkey, updated) + void saveNotifications(userPubkey, updated) return updated } @@ -158,7 +158,7 @@ export function markNotificationAsRead( */ export function markAllAsRead(userPubkey: string, notifications: Notification[]): Notification[] { const updated = notifications.map((n) => ({ ...n, read: true })) - saveNotifications(userPubkey, updated) + void saveNotifications(userPubkey, updated) return updated } @@ -171,6 +171,6 @@ export function deleteNotification( notifications: Notification[] ): Notification[] { const updated = notifications.filter((n) => n.id !== notificationId) - saveNotifications(userPubkey, updated) + void saveNotifications(userPubkey, updated) return updated }