Update linter and fix code style
This commit is contained in:
parent
5594355b4c
commit
7b6a8cf10b
7 changed files with 101 additions and 133 deletions
|
@ -12,7 +12,7 @@ const isValidNpub = (npub: string): boolean => {
|
|||
const { type, data } = nip19.decode(npub);
|
||||
// Check if the type is 'npub' and the data length is 32 bytes
|
||||
return type === 'npub' && data.length === 64;
|
||||
} catch (e) {
|
||||
} catch {
|
||||
// If any error is thrown, the npub is not valid
|
||||
return false;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ const isValidNostrRelay = async (url: string): Promise<boolean> => {
|
|||
}
|
||||
|
||||
return false;
|
||||
} catch (e) {
|
||||
} catch {
|
||||
// If any error is thrown, the URL is not a valid Nostr relay
|
||||
return false;
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ const getPubKey = (input: string): string | null => {
|
|||
}
|
||||
|
||||
return null;
|
||||
} catch (e) {
|
||||
} catch {
|
||||
// If any error is thrown, the input is not valid
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
if ($locale) {
|
||||
let newLanguageNames = new Intl.DisplayNames([$locale], { type: 'language' });
|
||||
|
||||
for (let l: string of $locales) {
|
||||
for (let l of $locales) {
|
||||
languageNames[l] = newLanguageNames.of(l);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue