chore: setup eslint and prettier with code formatting

This commit is contained in:
Alejandro Gómez
2025-12-11 13:00:25 +01:00
parent 189da9d141
commit 38f5461b54
34 changed files with 317 additions and 131 deletions

View File

@@ -1,7 +1,11 @@
import { nip19 } from "nostr-tools";
import type { NostrFilter } from "@/types/nostr";
import { isNip05 } from "./nip05";
import { isValidHexPubkey, isValidHexEventId, normalizeHex } from "./nostr-validation";
import {
isValidHexPubkey,
isValidHexEventId,
normalizeHex,
} from "./nostr-validation";
export interface ParsedReqCommand {
filter: NostrFilter;
@@ -264,7 +268,7 @@ function parseNpubOrHex(value: string): string | null {
if (decoded.type === "npub") {
return decoded.data;
}
} catch (e) {
} catch {
// Not valid npub, continue
}
}
@@ -290,7 +294,7 @@ function parseNoteOrHex(value: string): string | null {
if (decoded.type === "note") {
return decoded.data;
}
} catch (e) {
} catch {
// Not valid note, continue
}
}