From a75a19cd17d6638f3447f2b43579d73702bad117 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Fri, 1 Sep 2023 16:36:33 -0700 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=9A=A8=20lint=20megalodon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/package.json | 2 +- packages/megalodon/src/misskey.ts | 52 ++++++++++------ .../megalodon/src/misskey/entities/GetAll.ts | 8 +-- .../src/misskey/entities/announcement.ts | 16 ++--- .../megalodon/src/misskey/entities/app.ts | 14 ++--- .../src/misskey/entities/blocking.ts | 12 ++-- .../src/misskey/entities/createdNote.ts | 6 +- .../megalodon/src/misskey/entities/emoji.ts | 14 ++--- .../src/misskey/entities/favorite.ts | 12 ++-- .../megalodon/src/misskey/entities/field.ts | 10 ++-- .../megalodon/src/misskey/entities/file.ts | 36 +++++------ .../src/misskey/entities/followRequest.ts | 10 ++-- .../src/misskey/entities/follower.ts | 14 ++--- .../src/misskey/entities/following.ts | 14 ++--- .../megalodon/src/misskey/entities/hashtag.ts | 10 ++-- .../megalodon/src/misskey/entities/list.ts | 12 ++-- .../megalodon/src/misskey/entities/meta.ts | 28 ++++----- .../megalodon/src/misskey/entities/mute.ts | 12 ++-- .../megalodon/src/misskey/entities/note.ts | 50 ++++++++-------- .../src/misskey/entities/notification.ts | 22 +++---- .../megalodon/src/misskey/entities/poll.ts | 20 +++---- .../src/misskey/entities/reaction.ts | 14 ++--- .../src/misskey/entities/relation.ts | 20 +++---- .../megalodon/src/misskey/entities/session.ts | 8 +-- .../megalodon/src/misskey/entities/state.ts | 10 ++-- .../megalodon/src/misskey/entities/stats.ts | 14 ++--- .../megalodon/src/misskey/entities/user.ts | 18 +++--- .../src/misskey/entities/userDetail.ts | 56 ++++++++--------- .../src/misskey/entities/userDetailMe.ts | 60 +++++++++---------- .../megalodon/src/misskey/entities/userkey.ts | 8 +-- rome.json | 3 + 31 files changed, 301 insertions(+), 284 deletions(-) diff --git a/packages/backend/package.json b/packages/backend/package.json index d6b8133d5..81fdaab4f 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -16,7 +16,7 @@ "build": "pnpm swc src -d built -D", "build:debug": "pnpm swc src -d built -s -D", "watch": "pnpm swc src -d built -D -w", - "lint": "pnpm rome check --apply **/*.ts", + "lint": "pnpm rome check --apply **/*.ts ; pnpm run format", "mocha": "cross-env NODE_ENV=test TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha", "test": "pnpm run mocha", "format": "pnpm rome format * --write" diff --git a/packages/megalodon/src/misskey.ts b/packages/megalodon/src/misskey.ts index c48815bfc..25922a2ff 100644 --- a/packages/megalodon/src/misskey.ts +++ b/packages/megalodon/src/misskey.ts @@ -1514,7 +1514,7 @@ export default class Misskey implements MegalodonInterface { if (status.quote != null) status.quote = await this.addMentionsToStatus(status.quote, cache); - const idx = status.account.acct.indexOf('@'); + const idx = status.account.acct.indexOf("@"); const origin = idx < 0 ? null : status.account.acct.substring(idx + 1); status.mentions = ( @@ -1523,22 +1523,25 @@ export default class Misskey implements MegalodonInterface { for (const m of status.mentions.filter( (value, index, array) => array.indexOf(value) === index, )) { - const regexFull = new RegExp(`(?<=^|\\s|>)@${m.acct}(?=[^a-zA-Z0-9]|$)`, 'gi'); - const regexLocalUser = new RegExp(`(?<=^|\\s|>)@${m.acct}@${this.baseUrlToHost(this.baseUrl)}(?=[^a-zA-Z0-9]|$)`, 'gi'); - const regexRemoteUser = new RegExp(`(?<=^|\\s|>)@${m.username}(?=[^a-zA-Z0-9@]|$)`, 'gi'); + const regexFull = new RegExp( + `(?<=^|\\s|>)@${m.acct}(?=[^a-zA-Z0-9]|$)`, + "gi", + ); + const regexLocalUser = new RegExp( + `(?<=^|\\s|>)@${m.acct}@${this.baseUrlToHost( + this.baseUrl, + )}(?=[^a-zA-Z0-9]|$)`, + "gi", + ); + const regexRemoteUser = new RegExp( + `(?<=^|\\s|>)@${m.username}(?=[^a-zA-Z0-9@]|$)`, + "gi", + ); if (m.acct == m.username) { - status.content = status.content.replace( - regexLocalUser, - `@${m.acct}`, - ); - } - - else if (!status.content.match(regexFull)) { - status.content = status.content.replace( - regexRemoteUser, - `@${m.acct}`, - ); + status.content = status.content.replace(regexLocalUser, `@${m.acct}`); + } else if (!status.content.match(regexFull)) { + status.content = status.content.replace(regexRemoteUser, `@${m.acct}`); } status.content = status.content.replace( @@ -2015,7 +2018,10 @@ export default class Misskey implements MegalodonInterface { */ private reactionName(name: string): string { // See: https://github.com/tc39/proposal-regexp-unicode-property-escapes#matching-emoji - const isUnicodeEmoji = /\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F/gu.test(name); + const isUnicodeEmoji = + /\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F/gu.test( + name, + ); if (isUnicodeEmoji) { return name; } @@ -2025,7 +2031,10 @@ export default class Misskey implements MegalodonInterface { /** * POST /api/notes/reactions/create */ - public async reactStatus(id: string, name: string): Promise> { + public async reactStatus( + id: string, + name: string, + ): Promise> { await this.client.post<{}>("/api/notes/reactions/create", { noteId: id, reaction: this.reactionName(name), @@ -2047,7 +2056,10 @@ export default class Misskey implements MegalodonInterface { /** * POST /api/notes/reactions/delete */ - public async unreactStatus(id: string, name: string): Promise> { + public async unreactStatus( + id: string, + name: string, + ): Promise> { await this.client.post<{}>("/api/notes/reactions/delete", { noteId: id, reaction: this.reactionName(name), @@ -3037,7 +3049,9 @@ export default class Misskey implements MegalodonInterface { } try { - const match = q.match(/^@(?[a-zA-Z0-9_]+)(?:@(?[a-zA-Z0-9-.]+\.[a-zA-Z0-9-]+)|)$/); + const match = q.match( + /^@(?[a-zA-Z0-9_]+)(?:@(?[a-zA-Z0-9-.]+\.[a-zA-Z0-9-]+)|)$/, + ); if (match) { const lookupQuery = { username: match.groups?.user, diff --git a/packages/megalodon/src/misskey/entities/GetAll.ts b/packages/megalodon/src/misskey/entities/GetAll.ts index c41bd3f1b..94ace2f18 100644 --- a/packages/megalodon/src/misskey/entities/GetAll.ts +++ b/packages/megalodon/src/misskey/entities/GetAll.ts @@ -1,6 +1,6 @@ namespace MisskeyEntity { - export type GetAll = { - tutorial: number - defaultNoteVisibility: 'public' | 'home' | 'followers' | 'specified' - } + export type GetAll = { + tutorial: number; + defaultNoteVisibility: "public" | "home" | "followers" | "specified"; + }; } diff --git a/packages/megalodon/src/misskey/entities/announcement.ts b/packages/megalodon/src/misskey/entities/announcement.ts index 95100cbf1..7594ba7ef 100644 --- a/packages/megalodon/src/misskey/entities/announcement.ts +++ b/packages/megalodon/src/misskey/entities/announcement.ts @@ -1,10 +1,10 @@ namespace MisskeyEntity { - export type Announcement = { - id: string - createdAt: string - updatedAt: string - text: string - title: string - isRead?: boolean - } + export type Announcement = { + id: string; + createdAt: string; + updatedAt: string; + text: string; + title: string; + isRead?: boolean; + }; } diff --git a/packages/megalodon/src/misskey/entities/app.ts b/packages/megalodon/src/misskey/entities/app.ts index 40a704b94..5924060d8 100644 --- a/packages/megalodon/src/misskey/entities/app.ts +++ b/packages/megalodon/src/misskey/entities/app.ts @@ -1,9 +1,9 @@ namespace MisskeyEntity { - export type App = { - id: string - name: string - callbackUrl: string - permission: Array - secret: string - } + export type App = { + id: string; + name: string; + callbackUrl: string; + permission: Array; + secret: string; + }; } diff --git a/packages/megalodon/src/misskey/entities/blocking.ts b/packages/megalodon/src/misskey/entities/blocking.ts index 9900a777b..3e56790a7 100644 --- a/packages/megalodon/src/misskey/entities/blocking.ts +++ b/packages/megalodon/src/misskey/entities/blocking.ts @@ -1,10 +1,10 @@ /// namespace MisskeyEntity { - export type Blocking = { - id: string - createdAt: string - blockeeId: string - blockee: UserDetail - } + export type Blocking = { + id: string; + createdAt: string; + blockeeId: string; + blockee: UserDetail; + }; } diff --git a/packages/megalodon/src/misskey/entities/createdNote.ts b/packages/megalodon/src/misskey/entities/createdNote.ts index 88ba60040..235f7063f 100644 --- a/packages/megalodon/src/misskey/entities/createdNote.ts +++ b/packages/megalodon/src/misskey/entities/createdNote.ts @@ -1,7 +1,7 @@ /// namespace MisskeyEntity { - export type CreatedNote = { - createdNote: Note - } + export type CreatedNote = { + createdNote: Note; + }; } diff --git a/packages/megalodon/src/misskey/entities/emoji.ts b/packages/megalodon/src/misskey/entities/emoji.ts index e545a465d..d320760e9 100644 --- a/packages/megalodon/src/misskey/entities/emoji.ts +++ b/packages/megalodon/src/misskey/entities/emoji.ts @@ -1,9 +1,9 @@ namespace MisskeyEntity { - export type Emoji = { - name: string - host: string | null - url: string - aliases: Array - category: string - } + export type Emoji = { + name: string; + host: string | null; + url: string; + aliases: Array; + category: string; + }; } diff --git a/packages/megalodon/src/misskey/entities/favorite.ts b/packages/megalodon/src/misskey/entities/favorite.ts index 8ed7a54bf..ba948f2e7 100644 --- a/packages/megalodon/src/misskey/entities/favorite.ts +++ b/packages/megalodon/src/misskey/entities/favorite.ts @@ -1,10 +1,10 @@ /// namespace MisskeyEntity { - export type Favorite = { - id: string - createdAt: string - noteId: string - note: Note - } + export type Favorite = { + id: string; + createdAt: string; + noteId: string; + note: Note; + }; } diff --git a/packages/megalodon/src/misskey/entities/field.ts b/packages/megalodon/src/misskey/entities/field.ts index 57a2eb43d..8bbb2d7c4 100644 --- a/packages/megalodon/src/misskey/entities/field.ts +++ b/packages/megalodon/src/misskey/entities/field.ts @@ -1,7 +1,7 @@ namespace MisskeyEntity { - export type Field = { - name: string - value: string - verified?: string - } + export type Field = { + name: string; + value: string; + verified?: string; + }; } diff --git a/packages/megalodon/src/misskey/entities/file.ts b/packages/megalodon/src/misskey/entities/file.ts index e9e29ff65..e823dde1b 100644 --- a/packages/megalodon/src/misskey/entities/file.ts +++ b/packages/megalodon/src/misskey/entities/file.ts @@ -1,20 +1,20 @@ namespace MisskeyEntity { - export type File = { - id: string - createdAt: string - name: string - type: string - md5: string - size: number - isSensitive: boolean - properties: { - width: number - height: number - avgColor: string - } - url: string - thumbnailUrl: string - comment: string - blurhash: string - } + export type File = { + id: string; + createdAt: string; + name: string; + type: string; + md5: string; + size: number; + isSensitive: boolean; + properties: { + width: number; + height: number; + avgColor: string; + }; + url: string; + thumbnailUrl: string; + comment: string; + blurhash: string; + }; } diff --git a/packages/megalodon/src/misskey/entities/followRequest.ts b/packages/megalodon/src/misskey/entities/followRequest.ts index bd2777b2d..60bd0e0ab 100644 --- a/packages/megalodon/src/misskey/entities/followRequest.ts +++ b/packages/megalodon/src/misskey/entities/followRequest.ts @@ -1,9 +1,9 @@ /// namespace MisskeyEntity { - export type FollowRequest = { - id: string - follower: User - followee: User - } + export type FollowRequest = { + id: string; + follower: User; + followee: User; + }; } diff --git a/packages/megalodon/src/misskey/entities/follower.ts b/packages/megalodon/src/misskey/entities/follower.ts index 70ef632e1..34ae82551 100644 --- a/packages/megalodon/src/misskey/entities/follower.ts +++ b/packages/megalodon/src/misskey/entities/follower.ts @@ -1,11 +1,11 @@ /// namespace MisskeyEntity { - export type Follower = { - id: string - createdAt: string - followeeId: string - followerId: string - follower: UserDetail - } + export type Follower = { + id: string; + createdAt: string; + followeeId: string; + followerId: string; + follower: UserDetail; + }; } diff --git a/packages/megalodon/src/misskey/entities/following.ts b/packages/megalodon/src/misskey/entities/following.ts index 927a91354..6cbc8f1c3 100644 --- a/packages/megalodon/src/misskey/entities/following.ts +++ b/packages/megalodon/src/misskey/entities/following.ts @@ -1,11 +1,11 @@ /// namespace MisskeyEntity { - export type Following = { - id: string - createdAt: string - followeeId: string - followerId: string - followee: UserDetail - } + export type Following = { + id: string; + createdAt: string; + followeeId: string; + followerId: string; + followee: UserDetail; + }; } diff --git a/packages/megalodon/src/misskey/entities/hashtag.ts b/packages/megalodon/src/misskey/entities/hashtag.ts index 6a3fe43ad..3ec4d6675 100644 --- a/packages/megalodon/src/misskey/entities/hashtag.ts +++ b/packages/megalodon/src/misskey/entities/hashtag.ts @@ -1,7 +1,7 @@ namespace MisskeyEntity { - export type Hashtag = { - tag: string - chart: Array - usersCount: number - } + export type Hashtag = { + tag: string; + chart: Array; + usersCount: number; + }; } diff --git a/packages/megalodon/src/misskey/entities/list.ts b/packages/megalodon/src/misskey/entities/list.ts index 8167d2981..60706592a 100644 --- a/packages/megalodon/src/misskey/entities/list.ts +++ b/packages/megalodon/src/misskey/entities/list.ts @@ -1,8 +1,8 @@ namespace MisskeyEntity { - export type List = { - id: string - createdAt: string - name: string - userIds: Array - } + export type List = { + id: string; + createdAt: string; + name: string; + userIds: Array; + }; } diff --git a/packages/megalodon/src/misskey/entities/meta.ts b/packages/megalodon/src/misskey/entities/meta.ts index 7dd5f6400..97827fe8f 100644 --- a/packages/megalodon/src/misskey/entities/meta.ts +++ b/packages/megalodon/src/misskey/entities/meta.ts @@ -1,18 +1,18 @@ /// namespace MisskeyEntity { - export type Meta = { - maintainerName: string - maintainerEmail: string - name: string - version: string - uri: string - description: string - langs: Array - disableRegistration: boolean - disableLocalTimeline: boolean - bannerUrl: string - maxNoteTextLength: 3000 - emojis: Array - } + export type Meta = { + maintainerName: string; + maintainerEmail: string; + name: string; + version: string; + uri: string; + description: string; + langs: Array; + disableRegistration: boolean; + disableLocalTimeline: boolean; + bannerUrl: string; + maxNoteTextLength: 3000; + emojis: Array; + }; } diff --git a/packages/megalodon/src/misskey/entities/mute.ts b/packages/megalodon/src/misskey/entities/mute.ts index 3cd7ae409..7975b3d31 100644 --- a/packages/megalodon/src/misskey/entities/mute.ts +++ b/packages/megalodon/src/misskey/entities/mute.ts @@ -1,10 +1,10 @@ /// namespace MisskeyEntity { - export type Mute = { - id: string - createdAt: string - muteeId: string - mutee: UserDetail - } + export type Mute = { + id: string; + createdAt: string; + muteeId: string; + mutee: UserDetail; + }; } diff --git a/packages/megalodon/src/misskey/entities/note.ts b/packages/megalodon/src/misskey/entities/note.ts index 1d7207de1..64a0a5078 100644 --- a/packages/megalodon/src/misskey/entities/note.ts +++ b/packages/megalodon/src/misskey/entities/note.ts @@ -4,29 +4,29 @@ /// namespace MisskeyEntity { - export type Note = { - id: string - createdAt: string - userId: string - user: User - text: string | null - cw: string | null - visibility: 'public' | 'home' | 'followers' | 'specified' - renoteCount: number - repliesCount: number - reactions: { [key: string]: number } - emojis: Array - fileIds: Array - files: Array - replyId: string | null - renoteId: string | null - uri?: string - reply?: Note - renote?: Note - viaMobile?: boolean - tags?: Array - poll?: Poll - mentions?: Array - myReaction?: string - } + export type Note = { + id: string; + createdAt: string; + userId: string; + user: User; + text: string | null; + cw: string | null; + visibility: "public" | "home" | "followers" | "specified"; + renoteCount: number; + repliesCount: number; + reactions: { [key: string]: number }; + emojis: Array; + fileIds: Array; + files: Array; + replyId: string | null; + renoteId: string | null; + uri?: string; + reply?: Note; + renote?: Note; + viaMobile?: boolean; + tags?: Array; + poll?: Poll; + mentions?: Array; + myReaction?: string; + }; } diff --git a/packages/megalodon/src/misskey/entities/notification.ts b/packages/megalodon/src/misskey/entities/notification.ts index c331a1ec8..7ecb91153 100644 --- a/packages/megalodon/src/misskey/entities/notification.ts +++ b/packages/megalodon/src/misskey/entities/notification.ts @@ -2,16 +2,16 @@ /// namespace MisskeyEntity { - export type Notification = { - id: string - createdAt: string - // https://github.com/syuilo/misskey/blob/056942391aee135eb6c77aaa63f6ed5741d701a6/src/models/entities/notification.ts#L50-L62 - type: NotificationType - userId: string - user: User - note?: Note - reaction?: string - } + export type Notification = { + id: string; + createdAt: string; + // https://github.com/syuilo/misskey/blob/056942391aee135eb6c77aaa63f6ed5741d701a6/src/models/entities/notification.ts#L50-L62 + type: NotificationType; + userId: string; + user: User; + note?: Note; + reaction?: string; + }; - export type NotificationType = string + export type NotificationType = string; } diff --git a/packages/megalodon/src/misskey/entities/poll.ts b/packages/megalodon/src/misskey/entities/poll.ts index a3f1d971a..9f6bfa40d 100644 --- a/packages/megalodon/src/misskey/entities/poll.ts +++ b/packages/megalodon/src/misskey/entities/poll.ts @@ -1,13 +1,13 @@ namespace MisskeyEntity { - export type Choice = { - text: string - votes: number - isVoted: boolean - } + export type Choice = { + text: string; + votes: number; + isVoted: boolean; + }; - export type Poll = { - multiple: boolean - expiresAt: string - choices: Array - } + export type Poll = { + multiple: boolean; + expiresAt: string; + choices: Array; + }; } diff --git a/packages/megalodon/src/misskey/entities/reaction.ts b/packages/megalodon/src/misskey/entities/reaction.ts index 0c8903529..b35a25bfb 100644 --- a/packages/megalodon/src/misskey/entities/reaction.ts +++ b/packages/megalodon/src/misskey/entities/reaction.ts @@ -1,11 +1,11 @@ /// namespace MisskeyEntity { - export type Reaction = { - id: string - createdAt: string - user: User - url?: string - type: string - } + export type Reaction = { + id: string; + createdAt: string; + user: User; + url?: string; + type: string; + }; } diff --git a/packages/megalodon/src/misskey/entities/relation.ts b/packages/megalodon/src/misskey/entities/relation.ts index 07653b486..6db4a1b16 100644 --- a/packages/megalodon/src/misskey/entities/relation.ts +++ b/packages/megalodon/src/misskey/entities/relation.ts @@ -1,12 +1,12 @@ namespace MisskeyEntity { - export type Relation = { - id: string - isFollowing: boolean - hasPendingFollowRequestFromYou: boolean - hasPendingFollowRequestToYou: boolean - isFollowed: boolean - isBlocking: boolean - isBlocked: boolean - isMuted: boolean - } + export type Relation = { + id: string; + isFollowing: boolean; + hasPendingFollowRequestFromYou: boolean; + hasPendingFollowRequestToYou: boolean; + isFollowed: boolean; + isBlocking: boolean; + isBlocked: boolean; + isMuted: boolean; + }; } diff --git a/packages/megalodon/src/misskey/entities/session.ts b/packages/megalodon/src/misskey/entities/session.ts index 47fe9cf82..572333ff0 100644 --- a/packages/megalodon/src/misskey/entities/session.ts +++ b/packages/megalodon/src/misskey/entities/session.ts @@ -1,6 +1,6 @@ namespace MisskeyEntity { - export type Session = { - token: string - url: string - } + export type Session = { + token: string; + url: string; + }; } diff --git a/packages/megalodon/src/misskey/entities/state.ts b/packages/megalodon/src/misskey/entities/state.ts index 4538fb461..62d60ce28 100644 --- a/packages/megalodon/src/misskey/entities/state.ts +++ b/packages/megalodon/src/misskey/entities/state.ts @@ -1,7 +1,7 @@ namespace MisskeyEntity { - export type State = { - isFavorited: boolean - isMutedThread: boolean - isWatching: boolean - } + export type State = { + isFavorited: boolean; + isMutedThread: boolean; + isWatching: boolean; + }; } diff --git a/packages/megalodon/src/misskey/entities/stats.ts b/packages/megalodon/src/misskey/entities/stats.ts index 7f080efda..9832a0ad8 100644 --- a/packages/megalodon/src/misskey/entities/stats.ts +++ b/packages/megalodon/src/misskey/entities/stats.ts @@ -1,9 +1,9 @@ namespace MisskeyEntity { - export type Stats = { - notesCount: number - originalNotesCount: number - usersCount: number - originalUsersCount: number - instances: number - } + export type Stats = { + notesCount: number; + originalNotesCount: number; + usersCount: number; + originalUsersCount: number; + instances: number; + }; } diff --git a/packages/megalodon/src/misskey/entities/user.ts b/packages/megalodon/src/misskey/entities/user.ts index 4ea7bde7c..96610f6e6 100644 --- a/packages/megalodon/src/misskey/entities/user.ts +++ b/packages/megalodon/src/misskey/entities/user.ts @@ -1,13 +1,13 @@ /// namespace MisskeyEntity { - export type User = { - id: string - name: string - username: string - host: string | null - avatarUrl: string - avatarColor: string - emojis: Array - } + export type User = { + id: string; + name: string; + username: string; + host: string | null; + avatarUrl: string; + avatarColor: string; + emojis: Array; + }; } diff --git a/packages/megalodon/src/misskey/entities/userDetail.ts b/packages/megalodon/src/misskey/entities/userDetail.ts index 1c6d6431d..0f5bd5f64 100644 --- a/packages/megalodon/src/misskey/entities/userDetail.ts +++ b/packages/megalodon/src/misskey/entities/userDetail.ts @@ -3,32 +3,32 @@ /// namespace MisskeyEntity { - export type UserDetail = { - id: string - name: string - username: string - host: string | null - avatarUrl: string - avatarColor: string - isAdmin: boolean - isModerator: boolean - isBot: boolean - isCat: boolean - emojis: Array - createdAt: string - bannerUrl: string - bannerColor: string - isLocked: boolean - isSilenced: boolean - isSuspended: boolean - description: string - followersCount: number - followingCount: number - notesCount: number - avatarId: string - bannerId: string - pinnedNoteIds?: Array - pinnedNotes?: Array - fields: Array - } + export type UserDetail = { + id: string; + name: string; + username: string; + host: string | null; + avatarUrl: string; + avatarColor: string; + isAdmin: boolean; + isModerator: boolean; + isBot: boolean; + isCat: boolean; + emojis: Array; + createdAt: string; + bannerUrl: string; + bannerColor: string; + isLocked: boolean; + isSilenced: boolean; + isSuspended: boolean; + description: string; + followersCount: number; + followingCount: number; + notesCount: number; + avatarId: string; + bannerId: string; + pinnedNoteIds?: Array; + pinnedNotes?: Array; + fields: Array; + }; } diff --git a/packages/megalodon/src/misskey/entities/userDetailMe.ts b/packages/megalodon/src/misskey/entities/userDetailMe.ts index 2cb680863..272e65ffa 100644 --- a/packages/megalodon/src/misskey/entities/userDetailMe.ts +++ b/packages/megalodon/src/misskey/entities/userDetailMe.ts @@ -3,34 +3,34 @@ /// namespace MisskeyEntity { - export type UserDetailMe = { - id: string - name: string - username: string - host: string | null - avatarUrl: string - avatarColor: string - isAdmin: boolean - isModerator: boolean - isBot: boolean - isCat: boolean - emojis: Array - createdAt: string - bannerUrl: string - bannerColor: string - isLocked: boolean - isSilenced: boolean - isSuspended: boolean - description: string - followersCount: number - followingCount: number - notesCount: number - avatarId: string - bannerId: string - pinnedNoteIds?: Array - pinnedNotes?: Array - fields: Array - alwaysMarkNsfw: boolean - lang: string | null - } + export type UserDetailMe = { + id: string; + name: string; + username: string; + host: string | null; + avatarUrl: string; + avatarColor: string; + isAdmin: boolean; + isModerator: boolean; + isBot: boolean; + isCat: boolean; + emojis: Array; + createdAt: string; + bannerUrl: string; + bannerColor: string; + isLocked: boolean; + isSilenced: boolean; + isSuspended: boolean; + description: string; + followersCount: number; + followingCount: number; + notesCount: number; + avatarId: string; + bannerId: string; + pinnedNoteIds?: Array; + pinnedNotes?: Array; + fields: Array; + alwaysMarkNsfw: boolean; + lang: string | null; + }; } diff --git a/packages/megalodon/src/misskey/entities/userkey.ts b/packages/megalodon/src/misskey/entities/userkey.ts index 5b66e95b8..921af6553 100644 --- a/packages/megalodon/src/misskey/entities/userkey.ts +++ b/packages/megalodon/src/misskey/entities/userkey.ts @@ -1,8 +1,8 @@ /// namespace MisskeyEntity { - export type UserKey = { - accessToken: string - user: User - } + export type UserKey = { + accessToken: string; + user: User; + }; } diff --git a/rome.json b/rome.json index 84866353c..7e62ff082 100644 --- a/rome.json +++ b/rome.json @@ -20,6 +20,9 @@ "*/model.json", "*.md", "*.spec.ts", + "*.png", + "*.jpeg", + "*.jpg", "**/tsconfig.json", "*/.yml" ]