diff --git a/packages/misskey-js/eslint.config.js b/packages/misskey-js/eslint.config.js index e34e7510b2..d8173f30e9 100644 --- a/packages/misskey-js/eslint.config.js +++ b/packages/misskey-js/eslint.config.js @@ -1,6 +1,7 @@ import tsParser from '@typescript-eslint/parser'; import sharedConfig from '../shared/eslint.config.js'; +// eslint-disable-next-line import/no-default-export export default [ ...sharedConfig, { diff --git a/packages/misskey-js/src/acct.ts b/packages/misskey-js/src/acct.ts index b25bc564ea..a80534b8fa 100644 --- a/packages/misskey-js/src/acct.ts +++ b/packages/misskey-js/src/acct.ts @@ -4,6 +4,7 @@ export type Acct = { }; export function parse(acct: string): Acct { + // eslint-disable-next-line no-param-reassign if (acct.startsWith('@')) acct = acct.substring(1); const split = acct.split('@', 2); return { username: split[0], host: split[1] || null }; diff --git a/packages/misskey-js/src/api.ts b/packages/misskey-js/src/api.ts index 76d055cbe4..ea1df57f3d 100644 --- a/packages/misskey-js/src/api.ts +++ b/packages/misskey-js/src/api.ts @@ -14,6 +14,7 @@ export type APIError = { code: string; message: string; kind: 'client' | 'server'; + // eslint-disable-next-line @typescript-eslint/no-explicit-any info: Record; }; @@ -29,6 +30,7 @@ export type FetchLike = (input: string, init?: { headers: { [key in string]: string } }) => Promise<{ status: number; + // eslint-disable-next-line @typescript-eslint/no-explicit-any json(): Promise; }>; @@ -49,6 +51,7 @@ export class APIClient { this.fetch = opts.fetch ?? ((...args) => fetch(...args)); } + // eslint-disable-next-line @typescript-eslint/no-explicit-any private assertIsRecord(obj: T): obj is T & Record { return obj !== null && typeof obj === 'object' && !Array.isArray(obj); } diff --git a/packages/misskey-js/src/api.types.ts b/packages/misskey-js/src/api.types.ts index 8c403639b7..5ee4194db2 100644 --- a/packages/misskey-js/src/api.types.ts +++ b/packages/misskey-js/src/api.types.ts @@ -28,11 +28,13 @@ type StrictExtract = Cond extends Union ? Union : never; type IsCaseMatched = Endpoints[E]['res'] extends SwitchCase + // eslint-disable-next-line @typescript-eslint/no-explicit-any ? IsNeverType> extends false ? true : false : false type GetCaseResult = Endpoints[E]['res'] extends SwitchCase + // eslint-disable-next-line @typescript-eslint/no-explicit-any ? StrictExtract[1] : never diff --git a/packages/misskey-js/src/consts.ts b/packages/misskey-js/src/consts.ts index 03b9069290..a6a90fa84a 100644 --- a/packages/misskey-js/src/consts.ts +++ b/packages/misskey-js/src/consts.ts @@ -137,7 +137,9 @@ export const moderationLogTypes = [ export type ModerationLogPayloads = { updateServerSettings: { + // eslint-disable-next-line @typescript-eslint/no-explicit-any before: any | null; + // eslint-disable-next-line @typescript-eslint/no-explicit-any after: any | null; }; suspend: { @@ -159,6 +161,7 @@ export type ModerationLogPayloads = { }; addCustomEmoji: { emojiId: string; + // eslint-disable-next-line @typescript-eslint/no-explicit-any emoji: any; }; updateCustomEmoji: {