Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESLint disable @typescript-eslint/no-explicit-any #1590

Merged
merged 1 commit into from
Jan 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web/src/lib/Content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class Content {

return x.index - y.index;
});
} catch (error: any) {
} catch (error) {
console.error('[content parse failed]', error);
return [new Token('text', content)];
}
Expand Down
1 change: 1 addition & 0 deletions web/src/lib/Emoji.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export type Emoji = {
url?: string;
};

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function toEmoji(emoji: any): Emoji {
if (emoji.native !== undefined) {
return {
Expand Down
2 changes: 1 addition & 1 deletion web/src/lib/Signer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type { UnsignedEvent } from 'nostr-typedef';

interface Window {
// NIP-07
nostr: any;
nostr: any; // eslint-disable-line @typescript-eslint/no-explicit-any
}
declare const window: Window;

Expand Down
2 changes: 1 addition & 1 deletion web/src/lib/components/EmojiPicker.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
onClickOutside,
custom
});
emojiPicker.appendChild(picker as any);
emojiPicker.appendChild(picker as any); // eslint-disable-line @typescript-eslint/no-explicit-any
console.debug('[emoji picker child]', emojiPicker.firstChild);
stopAutoUpdate = autoUpdate(button, emojiPicker, render);
}
Expand Down
2 changes: 1 addition & 1 deletion web/src/lib/components/Json.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
export let object: any;
export let object: any; // eslint-disable-line @typescript-eslint/no-explicit-any
</script>

<code>{JSON.stringify(object, null, 2)}</code>
Expand Down
1 change: 1 addition & 0 deletions web/src/lib/components/actions/ActionMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
$openNoteDialog = true;
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
async function emojiReaction(note: Event, emoji: any) {
console.log('[reaction with emoji]', note, emoji);

Expand Down
2 changes: 1 addition & 1 deletion web/src/lib/components/content/Ogp.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts" context="module">
const cache = new Map<string, any>();
const cache = new Map<string, any>(); // eslint-disable-line @typescript-eslint/no-explicit-any
</script>

<script lang="ts">
Expand Down
2 changes: 1 addition & 1 deletion web/src/lib/components/content/Url.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

declare global {
interface Window {
twttr: any;
twttr: any; // eslint-disable-line @typescript-eslint/no-explicit-any
}
}

Expand Down
1 change: 1 addition & 0 deletions web/src/lib/components/editor/NoteEditor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@
mention = undefined;
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
async function onEmojiPick({ detail: emoji }: { detail: any }): Promise<void> {
console.debug('[emoji pick]', emoji);
const shortcode = emoji.id.replaceAll('+', '_');
Expand Down
1 change: 1 addition & 0 deletions web/src/lib/media/FileStorageServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Signer } from '$lib/Signer';
import { filterTags } from '$lib/EventHelper';
import { getMediaUploader, type Media, type MediaResult } from './Media';

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export async function fetchNip96(origin: string): Promise<any> {
const nip96Url = new URL(origin);
nip96Url.pathname = '/.well-known/nostr/nip96.json';
Expand Down
2 changes: 1 addition & 1 deletion web/src/lib/media/Media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface Media {

export type MediaResult = {
url: string;
data: any;
data: any; // eslint-disable-line @typescript-eslint/no-explicit-any
};

export function getMediaUploader(): string {
Expand Down
1 change: 1 addition & 0 deletions web/src/routes/(app)/preferences/ReactionEmoji.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import EmojiPicker from '$lib/components/EmojiPicker.svelte';
import CustomEmoji from '$lib/components/content/CustomEmoji.svelte';

// eslint-disable-next-line @typescript-eslint/no-explicit-any
async function save({ detail }: { detail: any }) {
const emoji = toEmoji(detail);
console.log('[reaction emoji save]', emoji, $preferencesStore.reactionEmoji);
Expand Down
Loading