From ac64087a1edda9655e974d7f58a9819e2ecb9c5e Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Thu, 12 Jan 2023 20:54:33 -0800 Subject: [PATCH] no more eslint --- .vim/coc-settings.json | 2 +- .woodpecker/commit.yml | 3 +- Dockerfile | 3 +- README.md | 3 +- cypress/plugins/index.js | 1 - package.json | 5 +- packages/backend/package.json | 6 +- packages/backend/src/misc/gen-identicon.ts | 1 - packages/backend/src/misc/get-file-info.ts | 2 - .../api/endpoints/admin/abuse-user-reports.ts | 2 +- .../api/endpoints/admin/accounts/create.ts | 2 +- .../api/endpoints/admin/accounts/delete.ts | 2 +- .../api/endpoints/admin/accounts/hosted.ts | 2 +- .../server/api/endpoints/admin/ad/create.ts | 2 +- .../server/api/endpoints/admin/ad/delete.ts | 2 +- .../src/server/api/endpoints/admin/ad/list.ts | 2 +- .../server/api/endpoints/admin/ad/update.ts | 2 +- .../endpoints/admin/announcements/create.ts | 2 +- .../endpoints/admin/announcements/delete.ts | 2 +- .../api/endpoints/admin/announcements/list.ts | 2 +- .../endpoints/admin/announcements/update.ts | 2 +- .../api/endpoints/admin/delete-account.ts | 2 +- .../admin/delete-all-files-of-a-user.ts | 2 +- .../admin/drive-capacity-override.ts | 2 +- .../admin/drive/clean-remote-files.ts | 2 +- .../api/endpoints/admin/drive/cleanup.ts | 2 +- .../server/api/endpoints/admin/drive/files.ts | 2 +- .../api/endpoints/admin/drive/show-file.ts | 2 +- .../endpoints/admin/emoji/add-aliases-bulk.ts | 2 +- .../server/api/endpoints/admin/emoji/add.ts | 2 +- .../server/api/endpoints/admin/emoji/copy.ts | 2 +- .../api/endpoints/admin/emoji/delete-bulk.ts | 2 +- .../api/endpoints/admin/emoji/delete.ts | 2 +- .../api/endpoints/admin/emoji/import-zip.ts | 2 +- .../api/endpoints/admin/emoji/list-remote.ts | 2 +- .../server/api/endpoints/admin/emoji/list.ts | 2 +- .../admin/emoji/remove-aliases-bulk.ts | 2 +- .../endpoints/admin/emoji/set-aliases-bulk.ts | 2 +- .../admin/emoji/set-category-bulk.ts | 2 +- .../api/endpoints/admin/emoji/update.ts | 2 +- .../admin/federation/delete-all-files.ts | 2 +- .../refresh-remote-instance-metadata.ts | 2 +- .../admin/federation/remove-all-following.ts | 2 +- .../admin/federation/update-instance.ts | 2 +- .../api/endpoints/admin/get-index-stats.ts | 2 +- .../api/endpoints/admin/get-table-stats.ts | 2 +- .../api/endpoints/admin/get-user-ips.ts | 2 +- .../src/server/api/endpoints/admin/invite.ts | 2 +- .../src/server/api/endpoints/admin/meta.ts | 2 +- .../api/endpoints/admin/moderators/add.ts | 2 +- .../api/endpoints/admin/moderators/remove.ts | 2 +- .../api/endpoints/admin/promo/create.ts | 2 +- .../server/api/endpoints/admin/queue/clear.ts | 2 +- .../endpoints/admin/queue/deliver-delayed.ts | 2 +- .../endpoints/admin/queue/inbox-delayed.ts | 2 +- .../server/api/endpoints/admin/queue/stats.ts | 2 +- .../server/api/endpoints/admin/relays/add.ts | 2 +- .../server/api/endpoints/admin/relays/list.ts | 2 +- .../api/endpoints/admin/relays/remove.ts | 2 +- .../api/endpoints/admin/reset-password.ts | 2 +- .../admin/resolve-abuse-user-report.ts | 2 +- .../server/api/endpoints/admin/send-email.ts | 2 +- .../server/api/endpoints/admin/server-info.ts | 2 +- .../endpoints/admin/show-moderation-logs.ts | 2 +- .../server/api/endpoints/admin/show-user.ts | 2 +- .../server/api/endpoints/admin/show-users.ts | 2 +- .../api/endpoints/admin/silence-user.ts | 2 +- .../api/endpoints/admin/suspend-user.ts | 2 +- .../api/endpoints/admin/unsilence-user.ts | 2 +- .../api/endpoints/admin/unsuspend-user.ts | 2 +- .../server/api/endpoints/admin/update-meta.ts | 2 +- .../api/endpoints/admin/update-user-note.ts | 2 +- .../src/server/api/endpoints/admin/vacuum.ts | 2 +- .../src/server/api/endpoints/announcements.ts | 2 +- .../server/api/endpoints/antennas/create.ts | 2 +- .../server/api/endpoints/antennas/delete.ts | 2 +- .../src/server/api/endpoints/antennas/list.ts | 2 +- .../server/api/endpoints/antennas/markread.ts | 2 +- .../server/api/endpoints/antennas/notes.ts | 2 +- .../src/server/api/endpoints/antennas/show.ts | 2 +- .../server/api/endpoints/antennas/update.ts | 2 +- .../src/server/api/endpoints/ap/get.ts | 2 +- .../src/server/api/endpoints/ap/show.ts | 2 +- .../src/server/api/endpoints/app/create.ts | 2 +- .../src/server/api/endpoints/app/show.ts | 2 +- .../src/server/api/endpoints/auth/accept.ts | 2 +- .../api/endpoints/auth/session/generate.ts | 2 +- .../server/api/endpoints/auth/session/show.ts | 2 +- .../api/endpoints/auth/session/userkey.ts | 2 +- .../server/api/endpoints/blocking/create.ts | 2 +- .../server/api/endpoints/blocking/delete.ts | 2 +- .../src/server/api/endpoints/blocking/list.ts | 2 +- .../server/api/endpoints/channels/create.ts | 2 +- .../server/api/endpoints/channels/featured.ts | 2 +- .../server/api/endpoints/channels/follow.ts | 2 +- .../server/api/endpoints/channels/followed.ts | 2 +- .../server/api/endpoints/channels/owned.ts | 2 +- .../src/server/api/endpoints/channels/show.ts | 2 +- .../server/api/endpoints/channels/timeline.ts | 2 +- .../server/api/endpoints/channels/unfollow.ts | 2 +- .../server/api/endpoints/channels/update.ts | 3 +- .../api/endpoints/charts/active-users.ts | 2 +- .../server/api/endpoints/charts/ap-request.ts | 2 +- .../src/server/api/endpoints/charts/drive.ts | 2 +- .../server/api/endpoints/charts/federation.ts | 2 +- .../server/api/endpoints/charts/hashtag.ts | 2 +- .../server/api/endpoints/charts/instance.ts | 2 +- .../src/server/api/endpoints/charts/notes.ts | 2 +- .../server/api/endpoints/charts/user/drive.ts | 2 +- .../api/endpoints/charts/user/following.ts | 2 +- .../server/api/endpoints/charts/user/notes.ts | 2 +- .../api/endpoints/charts/user/reactions.ts | 2 +- .../src/server/api/endpoints/charts/users.ts | 2 +- .../server/api/endpoints/clips/add-note.ts | 2 +- .../src/server/api/endpoints/clips/create.ts | 2 +- .../src/server/api/endpoints/clips/delete.ts | 2 +- .../src/server/api/endpoints/clips/list.ts | 2 +- .../src/server/api/endpoints/clips/notes.ts | 2 +- .../server/api/endpoints/clips/remove-note.ts | 2 +- .../src/server/api/endpoints/clips/show.ts | 2 +- .../src/server/api/endpoints/clips/update.ts | 2 +- .../endpoints/compatibility/custom-emojis.ts | 2 +- .../endpoints/compatibility/instance-info.ts | 2 +- .../src/server/api/endpoints/custom-motd.ts | 2 +- .../api/endpoints/custom-splash-icons.ts | 2 +- .../backend/src/server/api/endpoints/drive.ts | 2 +- .../src/server/api/endpoints/drive/files.ts | 2 +- .../endpoints/drive/files/attached-notes.ts | 2 +- .../endpoints/drive/files/caption-image.ts | 2 +- .../endpoints/drive/files/check-existence.ts | 2 +- .../api/endpoints/drive/files/create.ts | 2 +- .../api/endpoints/drive/files/delete.ts | 2 +- .../api/endpoints/drive/files/find-by-hash.ts | 2 +- .../server/api/endpoints/drive/files/find.ts | 2 +- .../server/api/endpoints/drive/files/show.ts | 2 +- .../api/endpoints/drive/files/update.ts | 2 +- .../endpoints/drive/files/upload-from-url.ts | 2 +- .../src/server/api/endpoints/drive/folders.ts | 2 +- .../api/endpoints/drive/folders/create.ts | 2 +- .../api/endpoints/drive/folders/delete.ts | 2 +- .../api/endpoints/drive/folders/find.ts | 2 +- .../api/endpoints/drive/folders/show.ts | 2 +- .../api/endpoints/drive/folders/update.ts | 2 +- .../src/server/api/endpoints/drive/stream.ts | 2 +- .../api/endpoints/email-address/available.ts | 2 +- .../src/server/api/endpoints/endpoint.ts | 2 +- .../src/server/api/endpoints/endpoints.ts | 2 +- .../api/endpoints/export-custom-emojis.ts | 2 +- .../api/endpoints/federation/followers.ts | 2 +- .../api/endpoints/federation/following.ts | 2 +- .../api/endpoints/federation/instances.ts | 2 +- .../api/endpoints/federation/show-instance.ts | 2 +- .../server/api/endpoints/federation/stats.ts | 2 +- .../federation/update-remote-user.ts | 2 +- .../server/api/endpoints/federation/users.ts | 2 +- .../src/server/api/endpoints/fetch-rss.ts | 2 +- .../server/api/endpoints/following/create.ts | 2 +- .../server/api/endpoints/following/delete.ts | 2 +- .../api/endpoints/following/invalidate.ts | 2 +- .../endpoints/following/requests/accept.ts | 2 +- .../endpoints/following/requests/cancel.ts | 2 +- .../api/endpoints/following/requests/list.ts | 2 +- .../endpoints/following/requests/reject.ts | 2 +- .../server/api/endpoints/gallery/featured.ts | 2 +- .../server/api/endpoints/gallery/popular.ts | 2 +- .../src/server/api/endpoints/gallery/posts.ts | 2 +- .../api/endpoints/gallery/posts/create.ts | 2 +- .../api/endpoints/gallery/posts/delete.ts | 2 +- .../api/endpoints/gallery/posts/like.ts | 2 +- .../api/endpoints/gallery/posts/show.ts | 2 +- .../api/endpoints/gallery/posts/unlike.ts | 2 +- .../api/endpoints/gallery/posts/update.ts | 2 +- .../api/endpoints/get-online-users-count.ts | 2 +- .../src/server/api/endpoints/hashtags/list.ts | 2 +- .../server/api/endpoints/hashtags/search.ts | 2 +- .../src/server/api/endpoints/hashtags/show.ts | 2 +- .../server/api/endpoints/hashtags/trend.ts | 2 +- .../server/api/endpoints/hashtags/users.ts | 2 +- .../backend/src/server/api/endpoints/i.ts | 2 +- .../src/server/api/endpoints/i/2fa/done.ts | 2 +- .../server/api/endpoints/i/2fa/key-done.ts | 3 +- .../api/endpoints/i/2fa/password-less.ts | 2 +- .../api/endpoints/i/2fa/register-key.ts | 2 +- .../server/api/endpoints/i/2fa/register.ts | 2 +- .../server/api/endpoints/i/2fa/remove-key.ts | 2 +- .../server/api/endpoints/i/2fa/unregister.ts | 2 +- .../src/server/api/endpoints/i/apps.ts | 2 +- .../server/api/endpoints/i/authorized-apps.ts | 2 +- .../server/api/endpoints/i/change-password.ts | 2 +- .../server/api/endpoints/i/delete-account.ts | 2 +- .../server/api/endpoints/i/export-blocking.ts | 2 +- .../api/endpoints/i/export-following.ts | 2 +- .../src/server/api/endpoints/i/export-mute.ts | 2 +- .../server/api/endpoints/i/export-notes.ts | 2 +- .../api/endpoints/i/export-user-lists.ts | 2 +- .../src/server/api/endpoints/i/favorites.ts | 2 +- .../server/api/endpoints/i/gallery/likes.ts | 2 +- .../server/api/endpoints/i/gallery/posts.ts | 2 +- .../endpoints/i/get-word-muted-notes-count.ts | 2 +- .../server/api/endpoints/i/import-blocking.ts | 2 +- .../api/endpoints/i/import-following.ts | 2 +- .../server/api/endpoints/i/import-muting.ts | 2 +- .../api/endpoints/i/import-user-lists.ts | 2 +- .../src/server/api/endpoints/i/known-as.ts | 2 +- .../src/server/api/endpoints/i/move.ts | 2 +- .../server/api/endpoints/i/notifications.ts | 2 +- .../src/server/api/endpoints/i/page-likes.ts | 2 +- .../src/server/api/endpoints/i/pages.ts | 2 +- .../backend/src/server/api/endpoints/i/pin.ts | 2 +- .../i/read-all-messaging-messages.ts | 2 +- .../api/endpoints/i/read-all-unread-notes.ts | 2 +- .../api/endpoints/i/read-announcement.ts | 2 +- .../api/endpoints/i/regenerate-token.ts | 2 +- .../api/endpoints/i/registry/get-all.ts | 2 +- .../api/endpoints/i/registry/get-detail.ts | 2 +- .../server/api/endpoints/i/registry/get.ts | 2 +- .../endpoints/i/registry/keys-with-type.ts | 2 +- .../server/api/endpoints/i/registry/keys.ts | 2 +- .../server/api/endpoints/i/registry/remove.ts | 2 +- .../server/api/endpoints/i/registry/scopes.ts | 2 +- .../server/api/endpoints/i/registry/set.ts | 2 +- .../server/api/endpoints/i/revoke-token.ts | 2 +- .../server/api/endpoints/i/signin-history.ts | 2 +- .../src/server/api/endpoints/i/unpin.ts | 2 +- .../server/api/endpoints/i/update-email.ts | 2 +- .../src/server/api/endpoints/i/update.ts | 2 +- .../api/endpoints/i/user-group-invites.ts | 2 +- .../server/api/endpoints/i/webhooks/create.ts | 2 +- .../server/api/endpoints/i/webhooks/delete.ts | 2 +- .../server/api/endpoints/i/webhooks/list.ts | 2 +- .../server/api/endpoints/i/webhooks/show.ts | 2 +- .../server/api/endpoints/i/webhooks/update.ts | 2 +- .../server/api/endpoints/latest-version.ts | 2 +- .../server/api/endpoints/messaging/history.ts | 2 +- .../api/endpoints/messaging/messages.ts | 2 +- .../endpoints/messaging/messages/create.ts | 2 +- .../endpoints/messaging/messages/delete.ts | 2 +- .../api/endpoints/messaging/messages/read.ts | 2 +- .../backend/src/server/api/endpoints/meta.ts | 2 +- .../server/api/endpoints/miauth/gen-token.ts | 2 +- .../src/server/api/endpoints/mute/create.ts | 2 +- .../src/server/api/endpoints/mute/delete.ts | 2 +- .../src/server/api/endpoints/mute/list.ts | 2 +- .../src/server/api/endpoints/my/apps.ts | 2 +- .../backend/src/server/api/endpoints/notes.ts | 2 +- .../server/api/endpoints/notes/children.ts | 2 +- .../src/server/api/endpoints/notes/clips.ts | 2 +- .../api/endpoints/notes/conversation.ts | 2 +- .../src/server/api/endpoints/notes/create.ts | 2 +- .../src/server/api/endpoints/notes/delete.ts | 2 +- .../api/endpoints/notes/favorites/create.ts | 2 +- .../api/endpoints/notes/favorites/delete.ts | 2 +- .../server/api/endpoints/notes/featured.ts | 2 +- .../api/endpoints/notes/global-timeline.ts | 2 +- .../api/endpoints/notes/hybrid-timeline.ts | 2 +- .../api/endpoints/notes/local-timeline.ts | 2 +- .../server/api/endpoints/notes/mentions.ts | 2 +- .../endpoints/notes/polls/recommendation.ts | 2 +- .../server/api/endpoints/notes/polls/vote.ts | 2 +- .../server/api/endpoints/notes/reactions.ts | 2 +- .../api/endpoints/notes/reactions/create.ts | 2 +- .../api/endpoints/notes/reactions/delete.ts | 2 +- .../endpoints/notes/recommended-timeline.ts | 2 +- .../src/server/api/endpoints/notes/renotes.ts | 2 +- .../src/server/api/endpoints/notes/replies.ts | 2 +- .../api/endpoints/notes/search-by-tag.ts | 2 +- .../src/server/api/endpoints/notes/search.ts | 2 +- .../src/server/api/endpoints/notes/show.ts | 2 +- .../src/server/api/endpoints/notes/state.ts | 2 +- .../endpoints/notes/thread-muting/create.ts | 2 +- .../endpoints/notes/thread-muting/delete.ts | 2 +- .../server/api/endpoints/notes/timeline.ts | 2 +- .../server/api/endpoints/notes/translate.ts | 2 +- .../server/api/endpoints/notes/unrenote.ts | 2 +- .../api/endpoints/notes/user-list-timeline.ts | 2 +- .../api/endpoints/notes/watching/create.ts | 2 +- .../api/endpoints/notes/watching/delete.ts | 2 +- .../api/endpoints/notifications/create.ts | 2 +- .../notifications/mark-all-as-read.ts | 2 +- .../api/endpoints/notifications/read.ts | 2 +- .../src/server/api/endpoints/page-push.ts | 2 +- .../src/server/api/endpoints/pages/create.ts | 2 +- .../src/server/api/endpoints/pages/delete.ts | 2 +- .../server/api/endpoints/pages/featured.ts | 2 +- .../src/server/api/endpoints/pages/like.ts | 2 +- .../src/server/api/endpoints/pages/show.ts | 2 +- .../src/server/api/endpoints/pages/unlike.ts | 2 +- .../src/server/api/endpoints/pages/update.ts | 2 +- .../src/server/api/endpoints/patrons.ts | 2 +- .../backend/src/server/api/endpoints/ping.ts | 2 +- .../src/server/api/endpoints/pinned-users.ts | 2 +- .../src/server/api/endpoints/promo/read.ts | 2 +- .../api/endpoints/recommended-instances.ts | 2 +- .../src/server/api/endpoints/release.ts | 2 +- .../api/endpoints/request-reset-password.ts | 2 +- .../src/server/api/endpoints/reset-db.ts | 2 +- .../server/api/endpoints/reset-password.ts | 2 +- .../src/server/api/endpoints/server-info.ts | 2 +- .../backend/src/server/api/endpoints/stats.ts | 2 +- .../src/server/api/endpoints/sw/register.ts | 2 +- .../src/server/api/endpoints/sw/unregister.ts | 2 +- .../backend/src/server/api/endpoints/test.ts | 2 +- .../api/endpoints/username/available.ts | 2 +- .../backend/src/server/api/endpoints/users.ts | 2 +- .../src/server/api/endpoints/users/clips.ts | 2 +- .../server/api/endpoints/users/followers.ts | 2 +- .../server/api/endpoints/users/following.ts | 2 +- .../api/endpoints/users/gallery/posts.ts | 2 +- .../users/get-frequently-replied-users.ts | 2 +- .../api/endpoints/users/groups/create.ts | 2 +- .../api/endpoints/users/groups/delete.ts | 2 +- .../users/groups/invitations/accept.ts | 2 +- .../users/groups/invitations/reject.ts | 2 +- .../api/endpoints/users/groups/invite.ts | 2 +- .../api/endpoints/users/groups/joined.ts | 2 +- .../api/endpoints/users/groups/leave.ts | 2 +- .../api/endpoints/users/groups/owned.ts | 2 +- .../server/api/endpoints/users/groups/pull.ts | 2 +- .../server/api/endpoints/users/groups/show.ts | 2 +- .../api/endpoints/users/groups/transfer.ts | 2 +- .../api/endpoints/users/groups/update.ts | 2 +- .../api/endpoints/users/lists/create.ts | 2 +- .../api/endpoints/users/lists/delete-all.ts | 2 +- .../api/endpoints/users/lists/delete.ts | 2 +- .../server/api/endpoints/users/lists/list.ts | 2 +- .../server/api/endpoints/users/lists/pull.ts | 2 +- .../server/api/endpoints/users/lists/push.ts | 2 +- .../server/api/endpoints/users/lists/show.ts | 2 +- .../api/endpoints/users/lists/update.ts | 2 +- .../src/server/api/endpoints/users/notes.ts | 2 +- .../src/server/api/endpoints/users/pages.ts | 2 +- .../server/api/endpoints/users/reactions.ts | 2 +- .../api/endpoints/users/recommendation.ts | 2 +- .../server/api/endpoints/users/relation.ts | 2 +- .../api/endpoints/users/report-abuse.ts | 2 +- .../users/search-by-username-and-host.ts | 2 +- .../src/server/api/endpoints/users/search.ts | 2 +- .../src/server/api/endpoints/users/show.ts | 2 +- .../src/server/api/endpoints/users/stats.ts | 2 +- .../src/server/file/send-drive-file.ts | 2 +- .../backend/src/server/proxy/proxy-media.ts | 1 - packages/backend/src/server/web/boot.js | 2 - .../src/services/chart/charts/active-users.ts | 2 +- .../src/services/chart/charts/ap-request.ts | 2 +- .../src/services/chart/charts/drive.ts | 2 +- .../src/services/chart/charts/federation.ts | 2 +- .../src/services/chart/charts/hashtag.ts | 2 +- .../src/services/chart/charts/instance.ts | 2 +- .../src/services/chart/charts/notes.ts | 2 +- .../services/chart/charts/per-user-drive.ts | 2 +- .../chart/charts/per-user-following.ts | 2 +- .../services/chart/charts/per-user-notes.ts | 2 +- .../chart/charts/per-user-reactions.ts | 2 +- .../src/services/chart/charts/test-grouped.ts | 2 +- .../chart/charts/test-intersection.ts | 2 +- .../src/services/chart/charts/test-unique.ts | 2 +- .../backend/src/services/chart/charts/test.ts | 2 +- .../src/services/chart/charts/users.ts | 2 +- packages/backend/src/services/chart/core.ts | 2 +- packages/client/package.json | 7 +- .../client/src/components/MkAutocomplete.vue | 1 - packages/client/src/components/MkChart.vue | 6 - .../client/src/components/MkCode.core.vue | 1 - packages/client/src/components/MkFolder.vue | 2 +- .../client/src/components/MkFormulaCore.vue | 1 - packages/client/src/components/MkModal.vue | 2 - .../pages/messaging/messaging-room.form.vue | 1 - .../page-editor/els/page-editor.el.button.vue | 4 +- .../page-editor/els/page-editor.el.canvas.vue | 4 +- .../els/page-editor.el.counter.vue | 4 +- .../page-editor/els/page-editor.el.if.vue | 4 +- .../page-editor/els/page-editor.el.image.vue | 4 +- .../page-editor/els/page-editor.el.note.vue | 4 +- .../els/page-editor.el.number-input.vue | 4 +- .../page-editor/els/page-editor.el.post.vue | 4 +- .../els/page-editor.el.radio-button.vue | 4 +- .../els/page-editor.el.section.vue | 4 +- .../page-editor/els/page-editor.el.switch.vue | 4 +- .../els/page-editor.el.text-input.vue | 4 +- .../page-editor/els/page-editor.el.text.vue | 4 +- .../els/page-editor.el.textarea-input.vue | 4 +- .../els/page-editor.el.textarea.vue | 4 +- .../page-editor/page-editor.script-block.vue | 4 +- .../client/src/pages/welcome.entrance.a.vue | 4 +- .../client/src/pages/welcome.entrance.b.vue | 1 - .../client/src/pages/welcome.entrance.c.vue | 1 - packages/client/src/scripts/hpml/lib.ts | 1 - packages/client/src/store.ts | 1 - packages/client/src/ui/visitor/a.vue | 5 +- packages/client/src/ui/visitor/kanban.vue | 1 - packages/client/vite.json5.ts | 1 - packages/sw/package.json | 5 +- pnpm-lock.yaml | 876 +----------------- 393 files changed, 439 insertions(+), 1269 deletions(-) diff --git a/.vim/coc-settings.json b/.vim/coc-settings.json index b43627d46..62b7b934b 100644 --- a/.vim/coc-settings.json +++ b/.vim/coc-settings.json @@ -1,4 +1,4 @@ { "eslint.packageManager": "pnpm", - "workspace.workspaceFolderCheckCwd": false, + "workspace.workspaceFolderCheckCwd": false } diff --git a/.woodpecker/commit.yml b/.woodpecker/commit.yml index 703aa4c05..386484ce2 100644 --- a/.woodpecker/commit.yml +++ b/.woodpecker/commit.yml @@ -3,7 +3,8 @@ pipeline: image: node:latest commands: - cp .config/ci.yml .config/default.yml - - npm i -g pnpm + - corepack enable + - corepack prepare pnpm@latest --activate - pnpm i --frozen-lockfile - pnpm run build - pnpm run migrate diff --git a/Dockerfile b/Dockerfile index e3a304d58..4df93d1cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,8 @@ RUN apk update RUN apk add git ffmpeg tini alpine-sdk python3 # Configure corepack and pnpm -RUN npm i -g pnpm +RUN corepack enable +RUN corepack prepare pnpm@latest --activate RUN pnpm i --frozen-lockfile ARG NODE_ENV=production diff --git a/README.md b/README.md index 674f7c53d..1c7c234dc 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,8 @@ cd calckey/ ```sh # nvm install 19 && nvm use 19 -npm i -g pnpm +corepack enable +corepack prepare pnpm@latest --activate pnpm i ``` diff --git a/cypress/plugins/index.js b/cypress/plugins/index.js index 59b2bab6e..aa9918d21 100644 --- a/cypress/plugins/index.js +++ b/cypress/plugins/index.js @@ -15,7 +15,6 @@ /** * @type {Cypress.PluginConfig} */ -// eslint-disable-next-line no-unused-vars module.exports = (on, config) => { // `on` is used to hook into various events Cypress emits // `config` is the resolved Cypress config diff --git a/package.json b/package.json index fa9c2ac2d..bdb951ca6 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,6 @@ "@bull-board/ui": "^4.10.2", "@tensorflow/tfjs": "^3.21.0", "calckey-js": "^0.0.20", - "eslint": "^8.31.0", "execa": "5.1.1", "gulp": "4.0.2", "gulp-cssnano": "2.1.3", @@ -55,13 +54,11 @@ "devDependencies": { "@types/gulp": "4.0.10", "@types/gulp-rename": "2.0.1", - "@typescript-eslint/parser": "5.46.1", "cross-env": "7.0.3", "cypress": "10.11.0", "install-peers": "^1.0.4", "rome": "^11.0.0", "start-server-and-test": "1.15.2", - "typescript": "4.9.4", - "vue-eslint-parser": "^9.1.0" + "typescript": "4.9.4" } } diff --git a/packages/backend/package.json b/packages/backend/package.json index fe19ba2d2..9580ffb0f 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -10,7 +10,7 @@ "revertmigration": "typeorm migration:revert -d ormconfig.js", "build": "pnpm swc src -d built -D", "watch": "pnpm swc src -d built -D -w", - "lint": "pnpm eslint --quiet \"src/**/*.ts\"", + "lint": "pnpm rome check \"src/**/*.ts\"", "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" }, @@ -178,11 +178,7 @@ "@types/web-push": "3.3.2", "@types/websocket": "1.0.5", "@types/ws": "8.5.3", - "@typescript-eslint/eslint-plugin": "5.46.1", - "@typescript-eslint/parser": "5.46.1", "cross-env": "7.0.3", - "eslint": "8.31.0", - "eslint-plugin-import": "2.26.0", "execa": "6.1.0", "swc-loader": "^0.2.3", "typescript": "4.9.4", diff --git a/packages/backend/src/misc/gen-identicon.ts b/packages/backend/src/misc/gen-identicon.ts index ba0f9a28b..79297f8f2 100644 --- a/packages/backend/src/misc/gen-identicon.ts +++ b/packages/backend/src/misc/gen-identicon.ts @@ -66,7 +66,6 @@ export function genIdenticon(seed: string, stream: WriteStream): Promise { // 1*n (filled by false) const center: boolean[] = new Array(n).fill(false); - // eslint:disable-next-line:prefer-for-of for (let x = 0; x < side.length; x++) { for (let y = 0; y < side[x].length; y++) { side[x][y] = rand(3) === 0; diff --git a/packages/backend/src/misc/get-file-info.ts b/packages/backend/src/misc/get-file-info.ts index 7ca105985..a63de286e 100644 --- a/packages/backend/src/misc/get-file-info.ts +++ b/packages/backend/src/misc/get-file-info.ts @@ -300,14 +300,12 @@ async function* asyncIterateFrames( }); command.run(); for (let i = 1; true; i++) { - // eslint-disable-line @typescript-eslint/no-unnecessary-condition const current = `${i}.png`; const next = `${i + 1}.png`; const framePath = join(cwd, current); if (await exists(join(cwd, next))) { yield framePath; } else if (!finished) { - // eslint-disable-line @typescript-eslint/no-unnecessary-condition watcher.add(next); await new Promise((resolve, reject) => { watcher.on("add", function onAdd(path) { diff --git a/packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts b/packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts index 6a07dec04..a434a1d4e 100644 --- a/packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts +++ b/packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts @@ -104,7 +104,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const query = makePaginationQuery( AbuseUserReports.createQueryBuilder("report"), diff --git a/packages/backend/src/server/api/endpoints/admin/accounts/create.ts b/packages/backend/src/server/api/endpoints/admin/accounts/create.ts index fc1f42fe7..64ac10420 100644 --- a/packages/backend/src/server/api/endpoints/admin/accounts/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/accounts/create.ts @@ -30,7 +30,7 @@ export const paramDef = { required: ["username", "password"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, _me) => { const me = _me ? await Users.findOneByOrFail({ id: _me.id }) : null; const noUsers = diff --git a/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts b/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts index 2397d4056..e71199b04 100644 --- a/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts +++ b/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts @@ -19,7 +19,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const user = await Users.findOneBy({ id: ps.userId }); diff --git a/packages/backend/src/server/api/endpoints/admin/accounts/hosted.ts b/packages/backend/src/server/api/endpoints/admin/accounts/hosted.ts index 184706cec..8f7d04768 100644 --- a/packages/backend/src/server/api/endpoints/admin/accounts/hosted.ts +++ b/packages/backend/src/server/api/endpoints/admin/accounts/hosted.ts @@ -17,7 +17,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const hostedConfig = config.isManagedHosting; const hosted = hostedConfig != null && hostedConfig === true; diff --git a/packages/backend/src/server/api/endpoints/admin/ad/create.ts b/packages/backend/src/server/api/endpoints/admin/ad/create.ts index be182900f..bdd43dd3b 100644 --- a/packages/backend/src/server/api/endpoints/admin/ad/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/ad/create.ts @@ -31,7 +31,7 @@ export const paramDef = { ], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { await Ads.insert({ id: genId(), diff --git a/packages/backend/src/server/api/endpoints/admin/ad/delete.ts b/packages/backend/src/server/api/endpoints/admin/ad/delete.ts index dd710a447..a0eb47c8a 100644 --- a/packages/backend/src/server/api/endpoints/admin/ad/delete.ts +++ b/packages/backend/src/server/api/endpoints/admin/ad/delete.ts @@ -25,7 +25,7 @@ export const paramDef = { required: ["id"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const ad = await Ads.findOneBy({ id: ps.id }); diff --git a/packages/backend/src/server/api/endpoints/admin/ad/list.ts b/packages/backend/src/server/api/endpoints/admin/ad/list.ts index 441a4b85d..70369159e 100644 --- a/packages/backend/src/server/api/endpoints/admin/ad/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/ad/list.ts @@ -19,7 +19,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const query = makePaginationQuery( Ads.createQueryBuilder("ad"), diff --git a/packages/backend/src/server/api/endpoints/admin/ad/update.ts b/packages/backend/src/server/api/endpoints/admin/ad/update.ts index 28fc12104..fdd05bb34 100644 --- a/packages/backend/src/server/api/endpoints/admin/ad/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/ad/update.ts @@ -41,7 +41,7 @@ export const paramDef = { ], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const ad = await Ads.findOneBy({ id: ps.id }); diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/create.ts b/packages/backend/src/server/api/endpoints/admin/announcements/create.ts index b521228fd..0b15c17e6 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/create.ts @@ -61,7 +61,7 @@ export const paramDef = { required: ["title", "text", "imageUrl"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const announcement = await Announcements.insert({ id: genId(), diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts b/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts index 472a1073b..043be07cc 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts @@ -25,7 +25,7 @@ export const paramDef = { required: ["id"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const announcement = await Announcements.findOneBy({ id: ps.id }); diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/list.ts b/packages/backend/src/server/api/endpoints/admin/announcements/list.ts index 699343eff..68bda5466 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/list.ts @@ -72,7 +72,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const query = makePaginationQuery( Announcements.createQueryBuilder("announcement"), diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/update.ts b/packages/backend/src/server/api/endpoints/admin/announcements/update.ts index cd47e496a..5e285527d 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/update.ts @@ -28,7 +28,7 @@ export const paramDef = { required: ["id", "title", "text", "imageUrl"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const announcement = await Announcements.findOneBy({ id: ps.id }); diff --git a/packages/backend/src/server/api/endpoints/admin/delete-account.ts b/packages/backend/src/server/api/endpoints/admin/delete-account.ts index 78c94ac50..386156ffc 100644 --- a/packages/backend/src/server/api/endpoints/admin/delete-account.ts +++ b/packages/backend/src/server/api/endpoints/admin/delete-account.ts @@ -19,7 +19,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const user = await Users.findOneByOrFail({ id: ps.userId }); if (user.isDeleted) { diff --git a/packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts b/packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts index 2c93ecd07..6f43ef299 100644 --- a/packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts @@ -17,7 +17,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const files = await DriveFiles.findBy({ userId: ps.userId, diff --git a/packages/backend/src/server/api/endpoints/admin/drive-capacity-override.ts b/packages/backend/src/server/api/endpoints/admin/drive-capacity-override.ts index df6c17ba9..345a14d1d 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive-capacity-override.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive-capacity-override.ts @@ -18,7 +18,7 @@ export const paramDef = { required: ["userId", "overrideMb"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const user = await Users.findOneBy({ id: ps.userId }); diff --git a/packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts b/packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts index aa8dc9fc2..e6b9833d6 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts @@ -14,7 +14,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { createCleanRemoteFilesJob(); }); diff --git a/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts b/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts index ba1402646..e8b6c835b 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts @@ -16,7 +16,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const files = await DriveFiles.findBy({ userId: IsNull(), diff --git a/packages/backend/src/server/api/endpoints/admin/drive/files.ts b/packages/backend/src/server/api/endpoints/admin/drive/files.ts index fc494e286..4979d2ad0 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/files.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/files.ts @@ -48,7 +48,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const query = makePaginationQuery( DriveFiles.createQueryBuilder("file"), diff --git a/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts b/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts index 514c19c54..0c9387bec 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts @@ -195,7 +195,7 @@ export const paramDef = { ], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const file = ps.fileId ? await DriveFiles.findOneBy({ id: ps.fileId }) diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts index 601750126..dcaadc03d 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts @@ -31,7 +31,7 @@ export const paramDef = { required: ["ids", "aliases"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const emojis = await Emojis.findBy({ id: In(ps.ids), diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/add.ts b/packages/backend/src/server/api/endpoints/admin/emoji/add.ts index 57768419f..2b3b2ac8d 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/add.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/add.ts @@ -30,7 +30,7 @@ export const paramDef = { required: ["fileId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const file = await DriveFiles.findOneBy({ id: ps.fileId }); diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts b/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts index bc3bd16a8..2c1ab5ded 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts @@ -44,7 +44,7 @@ export const paramDef = { required: ["emojiId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const emoji = await Emojis.findOneBy({ id: ps.emojiId }); diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts index 471f38250..5e378c4d6 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts @@ -26,7 +26,7 @@ export const paramDef = { required: ["ids"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const emojis = await Emojis.findBy({ id: In(ps.ids), diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/delete.ts b/packages/backend/src/server/api/endpoints/admin/emoji/delete.ts index abd591620..61c9fe698 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/delete.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/delete.ts @@ -27,7 +27,7 @@ export const paramDef = { required: ["id"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const emoji = await Emojis.findOneBy({ id: ps.id }); diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts b/packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts index 78a062eee..4499c50ab 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts @@ -16,7 +16,7 @@ export const paramDef = { required: ["fileId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { createImportCustomEmojisJob(user, ps.fileId); }); diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts b/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts index 2070b1413..6bbbd3bf8 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts @@ -77,7 +77,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const q = makePaginationQuery( Emojis.createQueryBuilder("emoji"), diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/list.ts b/packages/backend/src/server/api/endpoints/admin/emoji/list.ts index 46b551306..b8b351c76 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/list.ts @@ -71,7 +71,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const q = makePaginationQuery( Emojis.createQueryBuilder("emoji"), diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts index 408ee8d2e..3c21177ee 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts @@ -31,7 +31,7 @@ export const paramDef = { required: ["ids", "aliases"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const emojis = await Emojis.findBy({ id: In(ps.ids), diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts index a4b3db1e3..92ce4266d 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts @@ -31,7 +31,7 @@ export const paramDef = { required: ["ids", "aliases"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { await Emojis.update( { diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts index 8a0e6c589..273478a82 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts @@ -30,7 +30,7 @@ export const paramDef = { required: ["ids"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { await Emojis.update( { diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/update.ts b/packages/backend/src/server/api/endpoints/admin/emoji/update.ts index 8024e77bc..2e4743e70 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/update.ts @@ -38,7 +38,7 @@ export const paramDef = { required: ["id", "name", "aliases"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const emoji = await Emojis.findOneBy({ id: ps.id }); diff --git a/packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts b/packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts index 3f0a48839..a0ab1e621 100644 --- a/packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts +++ b/packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts @@ -17,7 +17,7 @@ export const paramDef = { required: ["host"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const files = await DriveFiles.findBy({ userHost: ps.host, diff --git a/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts b/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts index 236072bb2..487e5381d 100644 --- a/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts +++ b/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts @@ -18,7 +18,7 @@ export const paramDef = { required: ["host"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const instance = await Instances.findOneBy({ host: toPuny(ps.host) }); diff --git a/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts b/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts index a436ecda6..b449dbb95 100644 --- a/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts +++ b/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts @@ -17,7 +17,7 @@ export const paramDef = { required: ["host"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const followings = await Followings.findBy({ followerHost: ps.host, diff --git a/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts b/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts index 2ae5a7693..093704976 100644 --- a/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts +++ b/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts @@ -18,7 +18,7 @@ export const paramDef = { required: ["host", "isSuspended"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const instance = await Instances.findOneBy({ host: toPuny(ps.host) }); diff --git a/packages/backend/src/server/api/endpoints/admin/get-index-stats.ts b/packages/backend/src/server/api/endpoints/admin/get-index-stats.ts index 773f56c98..3e643364d 100644 --- a/packages/backend/src/server/api/endpoints/admin/get-index-stats.ts +++ b/packages/backend/src/server/api/endpoints/admin/get-index-stats.ts @@ -14,7 +14,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async () => { const stats = await db.query("SELECT * FROM pg_indexes;").then((recs) => { const res = [] as { tablename: string; indexname: string }[]; diff --git a/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts b/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts index 79c541540..0fd4f03a4 100644 --- a/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts +++ b/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts @@ -26,7 +26,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async () => { const sizes = await db .query(` diff --git a/packages/backend/src/server/api/endpoints/admin/get-user-ips.ts b/packages/backend/src/server/api/endpoints/admin/get-user-ips.ts index 061f4153c..35462802b 100644 --- a/packages/backend/src/server/api/endpoints/admin/get-user-ips.ts +++ b/packages/backend/src/server/api/endpoints/admin/get-user-ips.ts @@ -16,7 +16,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const ips = await UserIps.find({ where: { userId: ps.userId }, diff --git a/packages/backend/src/server/api/endpoints/admin/invite.ts b/packages/backend/src/server/api/endpoints/admin/invite.ts index eaa74cf37..7683abb4d 100644 --- a/packages/backend/src/server/api/endpoints/admin/invite.ts +++ b/packages/backend/src/server/api/endpoints/admin/invite.ts @@ -32,7 +32,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async () => { const code = rndstr({ length: 8, diff --git a/packages/backend/src/server/api/endpoints/admin/meta.ts b/packages/backend/src/server/api/endpoints/admin/meta.ts index e9ea48a39..6edb7d73e 100644 --- a/packages/backend/src/server/api/endpoints/admin/meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/meta.ts @@ -465,7 +465,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const instance = await fetchMeta(true); diff --git a/packages/backend/src/server/api/endpoints/admin/moderators/add.ts b/packages/backend/src/server/api/endpoints/admin/moderators/add.ts index a65a2c26a..e58cf723c 100644 --- a/packages/backend/src/server/api/endpoints/admin/moderators/add.ts +++ b/packages/backend/src/server/api/endpoints/admin/moderators/add.ts @@ -17,7 +17,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const user = await Users.findOneBy({ id: ps.userId }); diff --git a/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts b/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts index 11f6945b6..3041d03e2 100644 --- a/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts +++ b/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts @@ -17,7 +17,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const user = await Users.findOneBy({ id: ps.userId }); diff --git a/packages/backend/src/server/api/endpoints/admin/promo/create.ts b/packages/backend/src/server/api/endpoints/admin/promo/create.ts index 7bb29ac6a..4c5b41cab 100644 --- a/packages/backend/src/server/api/endpoints/admin/promo/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/promo/create.ts @@ -33,7 +33,7 @@ export const paramDef = { required: ["noteId", "expiresAt"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/admin/queue/clear.ts b/packages/backend/src/server/api/endpoints/admin/queue/clear.ts index 621fcdf54..708b820ff 100644 --- a/packages/backend/src/server/api/endpoints/admin/queue/clear.ts +++ b/packages/backend/src/server/api/endpoints/admin/queue/clear.ts @@ -15,7 +15,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { destroy(); diff --git a/packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts b/packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts index be2423c42..559bbde71 100644 --- a/packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts +++ b/packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts @@ -37,7 +37,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const jobs = await deliverQueue.getJobs(["delayed"]); diff --git a/packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts b/packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts index 6260ae7d8..26a9cf9ef 100644 --- a/packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts +++ b/packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts @@ -37,7 +37,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const jobs = await inboxQueue.getJobs(["delayed"]); diff --git a/packages/backend/src/server/api/endpoints/admin/queue/stats.ts b/packages/backend/src/server/api/endpoints/admin/queue/stats.ts index 0e3801aa1..bfd27646f 100644 --- a/packages/backend/src/server/api/endpoints/admin/queue/stats.ts +++ b/packages/backend/src/server/api/endpoints/admin/queue/stats.ts @@ -47,7 +47,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const deliverJobCounts = await deliverQueue.getJobCounts(); const inboxJobCounts = await inboxQueue.getJobCounts(); diff --git a/packages/backend/src/server/api/endpoints/admin/relays/add.ts b/packages/backend/src/server/api/endpoints/admin/relays/add.ts index 7bb120ea1..3242dc271 100644 --- a/packages/backend/src/server/api/endpoints/admin/relays/add.ts +++ b/packages/backend/src/server/api/endpoints/admin/relays/add.ts @@ -54,7 +54,7 @@ export const paramDef = { required: ["inbox"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { try { if (new URL(ps.inbox).protocol !== "https:") throw new Error("https only"); diff --git a/packages/backend/src/server/api/endpoints/admin/relays/list.ts b/packages/backend/src/server/api/endpoints/admin/relays/list.ts index 030a665b4..b5ce42866 100644 --- a/packages/backend/src/server/api/endpoints/admin/relays/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/relays/list.ts @@ -46,7 +46,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { return await listRelay(); }); diff --git a/packages/backend/src/server/api/endpoints/admin/relays/remove.ts b/packages/backend/src/server/api/endpoints/admin/relays/remove.ts index ec3a265e0..77f678249 100644 --- a/packages/backend/src/server/api/endpoints/admin/relays/remove.ts +++ b/packages/backend/src/server/api/endpoints/admin/relays/remove.ts @@ -16,7 +16,7 @@ export const paramDef = { required: ["inbox"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { return await removeRelay(ps.inbox); }); diff --git a/packages/backend/src/server/api/endpoints/admin/reset-password.ts b/packages/backend/src/server/api/endpoints/admin/reset-password.ts index 7d0104d2a..9341c753a 100644 --- a/packages/backend/src/server/api/endpoints/admin/reset-password.ts +++ b/packages/backend/src/server/api/endpoints/admin/reset-password.ts @@ -33,7 +33,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const user = await Users.findOneBy({ id: ps.userId }); diff --git a/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts b/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts index c7cc22bb1..1bebee23b 100644 --- a/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts +++ b/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts @@ -21,7 +21,7 @@ export const paramDef = { required: ["reportId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const report = await AbuseUserReports.findOneByOrFail({ id: ps.reportId }); diff --git a/packages/backend/src/server/api/endpoints/admin/send-email.ts b/packages/backend/src/server/api/endpoints/admin/send-email.ts index 1f9e54d83..f06fa70c3 100644 --- a/packages/backend/src/server/api/endpoints/admin/send-email.ts +++ b/packages/backend/src/server/api/endpoints/admin/send-email.ts @@ -18,7 +18,7 @@ export const paramDef = { required: ["to", "subject", "text"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { await sendEmail(ps.to, ps.subject, ps.text, ps.text); }); diff --git a/packages/backend/src/server/api/endpoints/admin/server-info.ts b/packages/backend/src/server/api/endpoints/admin/server-info.ts index 8a8ec82fb..5cb88fcdb 100644 --- a/packages/backend/src/server/api/endpoints/admin/server-info.ts +++ b/packages/backend/src/server/api/endpoints/admin/server-info.ts @@ -108,7 +108,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async () => { const memStats = await si.mem(); const fsStats = await si.fsSize(); diff --git a/packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts b/packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts index afdfc1391..407e3f135 100644 --- a/packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts +++ b/packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts @@ -66,7 +66,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const query = makePaginationQuery( ModerationLogs.createQueryBuilder("report"), diff --git a/packages/backend/src/server/api/endpoints/admin/show-user.ts b/packages/backend/src/server/api/endpoints/admin/show-user.ts index 4492569f2..a9fe2c826 100644 --- a/packages/backend/src/server/api/endpoints/admin/show-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/show-user.ts @@ -22,7 +22,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const [user, profile] = await Promise.all([ Users.findOneBy({ id: ps.userId }), diff --git a/packages/backend/src/server/api/endpoints/admin/show-users.ts b/packages/backend/src/server/api/endpoints/admin/show-users.ts index a0883adfe..cec6311f5 100644 --- a/packages/backend/src/server/api/endpoints/admin/show-users.ts +++ b/packages/backend/src/server/api/endpoints/admin/show-users.ts @@ -66,7 +66,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const query = Users.createQueryBuilder("user"); diff --git a/packages/backend/src/server/api/endpoints/admin/silence-user.ts b/packages/backend/src/server/api/endpoints/admin/silence-user.ts index 1ff0fa98c..1a88362c2 100644 --- a/packages/backend/src/server/api/endpoints/admin/silence-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/silence-user.ts @@ -18,7 +18,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const user = await Users.findOneBy({ id: ps.userId }); diff --git a/packages/backend/src/server/api/endpoints/admin/suspend-user.ts b/packages/backend/src/server/api/endpoints/admin/suspend-user.ts index daa4e8890..b7529be00 100644 --- a/packages/backend/src/server/api/endpoints/admin/suspend-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/suspend-user.ts @@ -21,7 +21,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const user = await Users.findOneBy({ id: ps.userId }); diff --git a/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts b/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts index 9afdc4c1f..f40ff3204 100644 --- a/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts @@ -18,7 +18,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const user = await Users.findOneBy({ id: ps.userId }); diff --git a/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts b/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts index 714888615..6a0025d5f 100644 --- a/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts @@ -18,7 +18,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const user = await Users.findOneBy({ id: ps.userId }); diff --git a/packages/backend/src/server/api/endpoints/admin/update-meta.ts b/packages/backend/src/server/api/endpoints/admin/update-meta.ts index b843a5326..83ec74cc7 100644 --- a/packages/backend/src/server/api/endpoints/admin/update-meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/update-meta.ts @@ -165,7 +165,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const set = {} as Partial; diff --git a/packages/backend/src/server/api/endpoints/admin/update-user-note.ts b/packages/backend/src/server/api/endpoints/admin/update-user-note.ts index 044515e93..8baf3b252 100644 --- a/packages/backend/src/server/api/endpoints/admin/update-user-note.ts +++ b/packages/backend/src/server/api/endpoints/admin/update-user-note.ts @@ -17,7 +17,7 @@ export const paramDef = { required: ["userId", "text"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const user = await Users.findOneBy({ id: ps.userId }); diff --git a/packages/backend/src/server/api/endpoints/admin/vacuum.ts b/packages/backend/src/server/api/endpoints/admin/vacuum.ts index c54291675..76897dabf 100644 --- a/packages/backend/src/server/api/endpoints/admin/vacuum.ts +++ b/packages/backend/src/server/api/endpoints/admin/vacuum.ts @@ -18,7 +18,7 @@ export const paramDef = { required: ["full", "analyze"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const params: string[] = []; diff --git a/packages/backend/src/server/api/endpoints/announcements.ts b/packages/backend/src/server/api/endpoints/announcements.ts index f963e3015..3c74a7b3e 100644 --- a/packages/backend/src/server/api/endpoints/announcements.ts +++ b/packages/backend/src/server/api/endpoints/announcements.ts @@ -72,7 +72,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( Announcements.createQueryBuilder("announcement"), diff --git a/packages/backend/src/server/api/endpoints/antennas/create.ts b/packages/backend/src/server/api/endpoints/antennas/create.ts index bd99c922e..dc3e405ec 100644 --- a/packages/backend/src/server/api/endpoints/antennas/create.ts +++ b/packages/backend/src/server/api/endpoints/antennas/create.ts @@ -82,7 +82,7 @@ export const paramDef = { ], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { if (user.movedToUri != null) throw new ApiError(meta.errors.noSuchUserGroup); let userList; diff --git a/packages/backend/src/server/api/endpoints/antennas/delete.ts b/packages/backend/src/server/api/endpoints/antennas/delete.ts index 6f1d87a53..301702b94 100644 --- a/packages/backend/src/server/api/endpoints/antennas/delete.ts +++ b/packages/backend/src/server/api/endpoints/antennas/delete.ts @@ -27,7 +27,7 @@ export const paramDef = { required: ["antennaId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const antenna = await Antennas.findOneBy({ id: ps.antennaId, diff --git a/packages/backend/src/server/api/endpoints/antennas/list.ts b/packages/backend/src/server/api/endpoints/antennas/list.ts index afe4349f9..36685bb79 100644 --- a/packages/backend/src/server/api/endpoints/antennas/list.ts +++ b/packages/backend/src/server/api/endpoints/antennas/list.ts @@ -27,7 +27,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const antennas = await Antennas.findBy({ userId: me.id, diff --git a/packages/backend/src/server/api/endpoints/antennas/markread.ts b/packages/backend/src/server/api/endpoints/antennas/markread.ts index d9faf9705..42a812a29 100644 --- a/packages/backend/src/server/api/endpoints/antennas/markread.ts +++ b/packages/backend/src/server/api/endpoints/antennas/markread.ts @@ -19,7 +19,7 @@ export const paramDef = { required: ["antennaId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const antenna = await Antennas.findOneBy({ userId: me.id, diff --git a/packages/backend/src/server/api/endpoints/antennas/notes.ts b/packages/backend/src/server/api/endpoints/antennas/notes.ts index b34454c2f..344f7b9d3 100644 --- a/packages/backend/src/server/api/endpoints/antennas/notes.ts +++ b/packages/backend/src/server/api/endpoints/antennas/notes.ts @@ -48,7 +48,7 @@ export const paramDef = { required: ["antennaId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const antenna = await Antennas.findOneBy({ id: ps.antennaId, diff --git a/packages/backend/src/server/api/endpoints/antennas/show.ts b/packages/backend/src/server/api/endpoints/antennas/show.ts index 715c0a655..3e429149a 100644 --- a/packages/backend/src/server/api/endpoints/antennas/show.ts +++ b/packages/backend/src/server/api/endpoints/antennas/show.ts @@ -33,7 +33,7 @@ export const paramDef = { required: ["antennaId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { // Fetch the antenna const antenna = await Antennas.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/antennas/update.ts b/packages/backend/src/server/api/endpoints/antennas/update.ts index c679c9925..7f9c6f05e 100644 --- a/packages/backend/src/server/api/endpoints/antennas/update.ts +++ b/packages/backend/src/server/api/endpoints/antennas/update.ts @@ -89,7 +89,7 @@ export const paramDef = { ], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // Fetch the antenna const antenna = await Antennas.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/ap/get.ts b/packages/backend/src/server/api/endpoints/ap/get.ts index 1a522691d..c2ae4e0c7 100644 --- a/packages/backend/src/server/api/endpoints/ap/get.ts +++ b/packages/backend/src/server/api/endpoints/ap/get.ts @@ -29,7 +29,7 @@ export const paramDef = { required: ["uri"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const resolver = new Resolver(); const object = await resolver.resolve(ps.uri); diff --git a/packages/backend/src/server/api/endpoints/ap/show.ts b/packages/backend/src/server/api/endpoints/ap/show.ts index 70f383c3d..8bd4f9cca 100644 --- a/packages/backend/src/server/api/endpoints/ap/show.ts +++ b/packages/backend/src/server/api/endpoints/ap/show.ts @@ -83,7 +83,7 @@ export const paramDef = { required: ["uri"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const object = await fetchAny(ps.uri, me); if (object) { diff --git a/packages/backend/src/server/api/endpoints/app/create.ts b/packages/backend/src/server/api/endpoints/app/create.ts index ec3d8be7a..811ac5edb 100644 --- a/packages/backend/src/server/api/endpoints/app/create.ts +++ b/packages/backend/src/server/api/endpoints/app/create.ts @@ -34,7 +34,7 @@ export const paramDef = { required: ["name", "description", "permission"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { if (user?.movedToUri != null) return await Apps.pack("", null, { diff --git a/packages/backend/src/server/api/endpoints/app/show.ts b/packages/backend/src/server/api/endpoints/app/show.ts index a14d0997b..1533b917e 100644 --- a/packages/backend/src/server/api/endpoints/app/show.ts +++ b/packages/backend/src/server/api/endpoints/app/show.ts @@ -29,7 +29,7 @@ export const paramDef = { required: ["appId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user, token) => { const isSecure = user != null && token == null; diff --git a/packages/backend/src/server/api/endpoints/auth/accept.ts b/packages/backend/src/server/api/endpoints/auth/accept.ts index c39652976..92357a071 100644 --- a/packages/backend/src/server/api/endpoints/auth/accept.ts +++ b/packages/backend/src/server/api/endpoints/auth/accept.ts @@ -29,7 +29,7 @@ export const paramDef = { required: ["token"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // Fetch token const session = await AuthSessions.findOneBy({ token: ps.token }); diff --git a/packages/backend/src/server/api/endpoints/auth/session/generate.ts b/packages/backend/src/server/api/endpoints/auth/session/generate.ts index cbe949fe3..b0245d13b 100644 --- a/packages/backend/src/server/api/endpoints/auth/session/generate.ts +++ b/packages/backend/src/server/api/endpoints/auth/session/generate.ts @@ -46,7 +46,7 @@ export const paramDef = { required: ["appSecret"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { // Lookup app const app = await Apps.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/auth/session/show.ts b/packages/backend/src/server/api/endpoints/auth/session/show.ts index ba0094180..c239134d6 100644 --- a/packages/backend/src/server/api/endpoints/auth/session/show.ts +++ b/packages/backend/src/server/api/endpoints/auth/session/show.ts @@ -49,7 +49,7 @@ export const paramDef = { required: ["token"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // Lookup session const session = await AuthSessions.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/auth/session/userkey.ts b/packages/backend/src/server/api/endpoints/auth/session/userkey.ts index 375f62785..66af1f692 100644 --- a/packages/backend/src/server/api/endpoints/auth/session/userkey.ts +++ b/packages/backend/src/server/api/endpoints/auth/session/userkey.ts @@ -57,7 +57,7 @@ export const paramDef = { required: ["appSecret", "token"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { // Lookup app const app = await Apps.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/blocking/create.ts b/packages/backend/src/server/api/endpoints/blocking/create.ts index f2f7bc7b7..6fc99c059 100644 --- a/packages/backend/src/server/api/endpoints/blocking/create.ts +++ b/packages/backend/src/server/api/endpoints/blocking/create.ts @@ -53,7 +53,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const blocker = await Users.findOneByOrFail({ id: user.id }); diff --git a/packages/backend/src/server/api/endpoints/blocking/delete.ts b/packages/backend/src/server/api/endpoints/blocking/delete.ts index fde20dce4..f55d51723 100644 --- a/packages/backend/src/server/api/endpoints/blocking/delete.ts +++ b/packages/backend/src/server/api/endpoints/blocking/delete.ts @@ -53,7 +53,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const blocker = await Users.findOneByOrFail({ id: user.id }); diff --git a/packages/backend/src/server/api/endpoints/blocking/list.ts b/packages/backend/src/server/api/endpoints/blocking/list.ts index 718ed14ea..18f5e34c6 100644 --- a/packages/backend/src/server/api/endpoints/blocking/list.ts +++ b/packages/backend/src/server/api/endpoints/blocking/list.ts @@ -32,7 +32,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const query = makePaginationQuery( Blockings.createQueryBuilder("blocking"), diff --git a/packages/backend/src/server/api/endpoints/channels/create.ts b/packages/backend/src/server/api/endpoints/channels/create.ts index ec13215d5..f92217c24 100644 --- a/packages/backend/src/server/api/endpoints/channels/create.ts +++ b/packages/backend/src/server/api/endpoints/channels/create.ts @@ -42,7 +42,7 @@ export const paramDef = { required: ["name"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { let banner = null; if (ps.bannerId != null) { diff --git a/packages/backend/src/server/api/endpoints/channels/featured.ts b/packages/backend/src/server/api/endpoints/channels/featured.ts index 15e08db33..6d65b95f7 100644 --- a/packages/backend/src/server/api/endpoints/channels/featured.ts +++ b/packages/backend/src/server/api/endpoints/channels/featured.ts @@ -26,7 +26,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const query = Channels.createQueryBuilder("channel") .where("channel.lastNotedAt IS NOT NULL") diff --git a/packages/backend/src/server/api/endpoints/channels/follow.ts b/packages/backend/src/server/api/endpoints/channels/follow.ts index 1dd4f7f92..727205374 100644 --- a/packages/backend/src/server/api/endpoints/channels/follow.ts +++ b/packages/backend/src/server/api/endpoints/channels/follow.ts @@ -28,7 +28,7 @@ export const paramDef = { required: ["channelId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const channel = await Channels.findOneBy({ id: ps.channelId, diff --git a/packages/backend/src/server/api/endpoints/channels/followed.ts b/packages/backend/src/server/api/endpoints/channels/followed.ts index 1c91312a6..4085c28d0 100644 --- a/packages/backend/src/server/api/endpoints/channels/followed.ts +++ b/packages/backend/src/server/api/endpoints/channels/followed.ts @@ -32,7 +32,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const query = makePaginationQuery( ChannelFollowings.createQueryBuilder(), diff --git a/packages/backend/src/server/api/endpoints/channels/owned.ts b/packages/backend/src/server/api/endpoints/channels/owned.ts index 25abfdbb7..678c4acdf 100644 --- a/packages/backend/src/server/api/endpoints/channels/owned.ts +++ b/packages/backend/src/server/api/endpoints/channels/owned.ts @@ -32,7 +32,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const query = makePaginationQuery( Channels.createQueryBuilder(), diff --git a/packages/backend/src/server/api/endpoints/channels/show.ts b/packages/backend/src/server/api/endpoints/channels/show.ts index 54db43c6a..66146e206 100644 --- a/packages/backend/src/server/api/endpoints/channels/show.ts +++ b/packages/backend/src/server/api/endpoints/channels/show.ts @@ -32,7 +32,7 @@ export const paramDef = { required: ["channelId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const channel = await Channels.findOneBy({ id: ps.channelId, diff --git a/packages/backend/src/server/api/endpoints/channels/timeline.ts b/packages/backend/src/server/api/endpoints/channels/timeline.ts index 8196753c6..154dd2d65 100644 --- a/packages/backend/src/server/api/endpoints/channels/timeline.ts +++ b/packages/backend/src/server/api/endpoints/channels/timeline.ts @@ -44,7 +44,7 @@ export const paramDef = { required: ["channelId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const channel = await Channels.findOneBy({ id: ps.channelId, diff --git a/packages/backend/src/server/api/endpoints/channels/unfollow.ts b/packages/backend/src/server/api/endpoints/channels/unfollow.ts index 66f661b05..75b4395a2 100644 --- a/packages/backend/src/server/api/endpoints/channels/unfollow.ts +++ b/packages/backend/src/server/api/endpoints/channels/unfollow.ts @@ -27,7 +27,7 @@ export const paramDef = { required: ["channelId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const channel = await Channels.findOneBy({ id: ps.channelId, diff --git a/packages/backend/src/server/api/endpoints/channels/update.ts b/packages/backend/src/server/api/endpoints/channels/update.ts index 802cce355..666f1bda6 100644 --- a/packages/backend/src/server/api/endpoints/channels/update.ts +++ b/packages/backend/src/server/api/endpoints/channels/update.ts @@ -53,7 +53,7 @@ export const paramDef = { required: ["channelId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const channel = await Channels.findOneBy({ id: ps.channelId, @@ -67,7 +67,6 @@ export default define(meta, paramDef, async (ps, me) => { throw new ApiError(meta.errors.accessDenied); } - // eslint:disable-next-line:no-unnecessary-initializer let banner = undefined; if (ps.bannerId != null) { banner = await DriveFiles.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/charts/active-users.ts b/packages/backend/src/server/api/endpoints/charts/active-users.ts index 941f106f5..dd6a4f741 100644 --- a/packages/backend/src/server/api/endpoints/charts/active-users.ts +++ b/packages/backend/src/server/api/endpoints/charts/active-users.ts @@ -22,7 +22,7 @@ export const paramDef = { required: ["span"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { return await activeUsersChart.getChart( ps.span, diff --git a/packages/backend/src/server/api/endpoints/charts/ap-request.ts b/packages/backend/src/server/api/endpoints/charts/ap-request.ts index 532c101fc..998faca6a 100644 --- a/packages/backend/src/server/api/endpoints/charts/ap-request.ts +++ b/packages/backend/src/server/api/endpoints/charts/ap-request.ts @@ -22,7 +22,7 @@ export const paramDef = { required: ["span"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { return await apRequestChart.getChart( ps.span, diff --git a/packages/backend/src/server/api/endpoints/charts/drive.ts b/packages/backend/src/server/api/endpoints/charts/drive.ts index aa75f7732..7bb4607ca 100644 --- a/packages/backend/src/server/api/endpoints/charts/drive.ts +++ b/packages/backend/src/server/api/endpoints/charts/drive.ts @@ -22,7 +22,7 @@ export const paramDef = { required: ["span"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { return await driveChart.getChart( ps.span, diff --git a/packages/backend/src/server/api/endpoints/charts/federation.ts b/packages/backend/src/server/api/endpoints/charts/federation.ts index d53dd073c..d358f6c67 100644 --- a/packages/backend/src/server/api/endpoints/charts/federation.ts +++ b/packages/backend/src/server/api/endpoints/charts/federation.ts @@ -22,7 +22,7 @@ export const paramDef = { required: ["span"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { return await federationChart.getChart( ps.span, diff --git a/packages/backend/src/server/api/endpoints/charts/hashtag.ts b/packages/backend/src/server/api/endpoints/charts/hashtag.ts index b4d43ce4b..9cb2faf82 100644 --- a/packages/backend/src/server/api/endpoints/charts/hashtag.ts +++ b/packages/backend/src/server/api/endpoints/charts/hashtag.ts @@ -23,7 +23,7 @@ export const paramDef = { required: ["span", "tag"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { return await hashtagChart.getChart( ps.span, diff --git a/packages/backend/src/server/api/endpoints/charts/instance.ts b/packages/backend/src/server/api/endpoints/charts/instance.ts index 8a246706b..a727ab866 100644 --- a/packages/backend/src/server/api/endpoints/charts/instance.ts +++ b/packages/backend/src/server/api/endpoints/charts/instance.ts @@ -23,7 +23,7 @@ export const paramDef = { required: ["span", "host"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { return await instanceChart.getChart( ps.span, diff --git a/packages/backend/src/server/api/endpoints/charts/notes.ts b/packages/backend/src/server/api/endpoints/charts/notes.ts index 50bca79be..0dc9b3471 100644 --- a/packages/backend/src/server/api/endpoints/charts/notes.ts +++ b/packages/backend/src/server/api/endpoints/charts/notes.ts @@ -22,7 +22,7 @@ export const paramDef = { required: ["span"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { return await notesChart.getChart( ps.span, diff --git a/packages/backend/src/server/api/endpoints/charts/user/drive.ts b/packages/backend/src/server/api/endpoints/charts/user/drive.ts index c8636eacc..444de851c 100644 --- a/packages/backend/src/server/api/endpoints/charts/user/drive.ts +++ b/packages/backend/src/server/api/endpoints/charts/user/drive.ts @@ -23,7 +23,7 @@ export const paramDef = { required: ["span", "userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { return await perUserDriveChart.getChart( ps.span, diff --git a/packages/backend/src/server/api/endpoints/charts/user/following.ts b/packages/backend/src/server/api/endpoints/charts/user/following.ts index c89e5ffdb..8aebb61e5 100644 --- a/packages/backend/src/server/api/endpoints/charts/user/following.ts +++ b/packages/backend/src/server/api/endpoints/charts/user/following.ts @@ -23,7 +23,7 @@ export const paramDef = { required: ["span", "userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { return await perUserFollowingChart.getChart( ps.span, diff --git a/packages/backend/src/server/api/endpoints/charts/user/notes.ts b/packages/backend/src/server/api/endpoints/charts/user/notes.ts index 4f710ee7e..80890ed48 100644 --- a/packages/backend/src/server/api/endpoints/charts/user/notes.ts +++ b/packages/backend/src/server/api/endpoints/charts/user/notes.ts @@ -23,7 +23,7 @@ export const paramDef = { required: ["span", "userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { return await perUserNotesChart.getChart( ps.span, diff --git a/packages/backend/src/server/api/endpoints/charts/user/reactions.ts b/packages/backend/src/server/api/endpoints/charts/user/reactions.ts index ac366ceb0..411af783a 100644 --- a/packages/backend/src/server/api/endpoints/charts/user/reactions.ts +++ b/packages/backend/src/server/api/endpoints/charts/user/reactions.ts @@ -23,7 +23,7 @@ export const paramDef = { required: ["span", "userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { return await perUserReactionsChart.getChart( ps.span, diff --git a/packages/backend/src/server/api/endpoints/charts/users.ts b/packages/backend/src/server/api/endpoints/charts/users.ts index de35e04ad..2dc2d6090 100644 --- a/packages/backend/src/server/api/endpoints/charts/users.ts +++ b/packages/backend/src/server/api/endpoints/charts/users.ts @@ -22,7 +22,7 @@ export const paramDef = { required: ["span"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { return await usersChart.getChart( ps.span, diff --git a/packages/backend/src/server/api/endpoints/clips/add-note.ts b/packages/backend/src/server/api/endpoints/clips/add-note.ts index ef36c34e3..132ee5299 100644 --- a/packages/backend/src/server/api/endpoints/clips/add-note.ts +++ b/packages/backend/src/server/api/endpoints/clips/add-note.ts @@ -41,7 +41,7 @@ export const paramDef = { required: ["clipId", "noteId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const clip = await Clips.findOneBy({ id: ps.clipId, diff --git a/packages/backend/src/server/api/endpoints/clips/create.ts b/packages/backend/src/server/api/endpoints/clips/create.ts index bac716b38..f46a0eba2 100644 --- a/packages/backend/src/server/api/endpoints/clips/create.ts +++ b/packages/backend/src/server/api/endpoints/clips/create.ts @@ -32,7 +32,7 @@ export const paramDef = { required: ["name"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const clip = await Clips.insert({ id: genId(), diff --git a/packages/backend/src/server/api/endpoints/clips/delete.ts b/packages/backend/src/server/api/endpoints/clips/delete.ts index 2aac8b97a..013d68710 100644 --- a/packages/backend/src/server/api/endpoints/clips/delete.ts +++ b/packages/backend/src/server/api/endpoints/clips/delete.ts @@ -26,7 +26,7 @@ export const paramDef = { required: ["clipId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const clip = await Clips.findOneBy({ id: ps.clipId, diff --git a/packages/backend/src/server/api/endpoints/clips/list.ts b/packages/backend/src/server/api/endpoints/clips/list.ts index ea4f64053..c77af6cac 100644 --- a/packages/backend/src/server/api/endpoints/clips/list.ts +++ b/packages/backend/src/server/api/endpoints/clips/list.ts @@ -27,7 +27,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const clips = await Clips.findBy({ userId: me.id, diff --git a/packages/backend/src/server/api/endpoints/clips/notes.ts b/packages/backend/src/server/api/endpoints/clips/notes.ts index bc8a77ea2..b9a4265ee 100644 --- a/packages/backend/src/server/api/endpoints/clips/notes.ts +++ b/packages/backend/src/server/api/endpoints/clips/notes.ts @@ -46,7 +46,7 @@ export const paramDef = { required: ["clipId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const clip = await Clips.findOneBy({ id: ps.clipId, diff --git a/packages/backend/src/server/api/endpoints/clips/remove-note.ts b/packages/backend/src/server/api/endpoints/clips/remove-note.ts index 925086f47..7f10d8eb6 100644 --- a/packages/backend/src/server/api/endpoints/clips/remove-note.ts +++ b/packages/backend/src/server/api/endpoints/clips/remove-note.ts @@ -34,7 +34,7 @@ export const paramDef = { required: ["clipId", "noteId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const clip = await Clips.findOneBy({ id: ps.clipId, diff --git a/packages/backend/src/server/api/endpoints/clips/show.ts b/packages/backend/src/server/api/endpoints/clips/show.ts index 870ad6a42..9c0e4c7fc 100644 --- a/packages/backend/src/server/api/endpoints/clips/show.ts +++ b/packages/backend/src/server/api/endpoints/clips/show.ts @@ -34,7 +34,7 @@ export const paramDef = { required: ["clipId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { // Fetch the clip const clip = await Clips.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/clips/update.ts b/packages/backend/src/server/api/endpoints/clips/update.ts index e16bf197c..dfc00f315 100644 --- a/packages/backend/src/server/api/endpoints/clips/update.ts +++ b/packages/backend/src/server/api/endpoints/clips/update.ts @@ -41,7 +41,7 @@ export const paramDef = { required: ["clipId", "name"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // Fetch the clip const clip = await Clips.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/compatibility/custom-emojis.ts b/packages/backend/src/server/api/endpoints/compatibility/custom-emojis.ts index e3ff9eb0a..c0033cbdf 100644 --- a/packages/backend/src/server/api/endpoints/compatibility/custom-emojis.ts +++ b/packages/backend/src/server/api/endpoints/compatibility/custom-emojis.ts @@ -18,7 +18,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async () => { const now = Date.now(); const emojis: Emoji[] = await Emojis.find({ diff --git a/packages/backend/src/server/api/endpoints/compatibility/instance-info.ts b/packages/backend/src/server/api/endpoints/compatibility/instance-info.ts index 89a7600a4..d67fe0c89 100644 --- a/packages/backend/src/server/api/endpoints/compatibility/instance-info.ts +++ b/packages/backend/src/server/api/endpoints/compatibility/instance-info.ts @@ -30,7 +30,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async () => { const now = Date.now(); const [meta, total, localPosts, instanceCount, firstAdmin, emojis] = diff --git a/packages/backend/src/server/api/endpoints/custom-motd.ts b/packages/backend/src/server/api/endpoints/custom-motd.ts index b9d463f0f..cc2ac8408 100644 --- a/packages/backend/src/server/api/endpoints/custom-motd.ts +++ b/packages/backend/src/server/api/endpoints/custom-motd.ts @@ -26,7 +26,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async () => { const meta = await fetchMeta(); const motd = await Promise.all(meta.customMOTD.map((x) => x)); diff --git a/packages/backend/src/server/api/endpoints/custom-splash-icons.ts b/packages/backend/src/server/api/endpoints/custom-splash-icons.ts index cdbd76dd8..059567250 100644 --- a/packages/backend/src/server/api/endpoints/custom-splash-icons.ts +++ b/packages/backend/src/server/api/endpoints/custom-splash-icons.ts @@ -26,7 +26,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async () => { const meta = await fetchMeta(); const icons = await Promise.all(meta.customSplashIcons.map((x) => x)); diff --git a/packages/backend/src/server/api/endpoints/drive.ts b/packages/backend/src/server/api/endpoints/drive.ts index a52aec318..44eefa29b 100644 --- a/packages/backend/src/server/api/endpoints/drive.ts +++ b/packages/backend/src/server/api/endpoints/drive.ts @@ -34,7 +34,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const instance = await fetchMeta(true); diff --git a/packages/backend/src/server/api/endpoints/drive/files.ts b/packages/backend/src/server/api/endpoints/drive/files.ts index ee189ecd1..0a3d931b4 100644 --- a/packages/backend/src/server/api/endpoints/drive/files.ts +++ b/packages/backend/src/server/api/endpoints/drive/files.ts @@ -43,7 +43,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( DriveFiles.createQueryBuilder("file"), diff --git a/packages/backend/src/server/api/endpoints/drive/files/attached-notes.ts b/packages/backend/src/server/api/endpoints/drive/files/attached-notes.ts index 0ba74f6b6..d3731e0c9 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/attached-notes.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/attached-notes.ts @@ -40,7 +40,7 @@ export const paramDef = { required: ["fileId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // Fetch file const file = await DriveFiles.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/drive/files/caption-image.ts b/packages/backend/src/server/api/endpoints/drive/files/caption-image.ts index 7fc510f27..a33040042 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/caption-image.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/caption-image.ts @@ -25,7 +25,7 @@ export const paramDef = { required: ["url"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const worker = createWorker({ logger: (m) => console.log(m), diff --git a/packages/backend/src/server/api/endpoints/drive/files/check-existence.ts b/packages/backend/src/server/api/endpoints/drive/files/check-existence.ts index a57564266..eb61e3772 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/check-existence.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/check-existence.ts @@ -25,7 +25,7 @@ export const paramDef = { required: ["md5"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const file = await DriveFiles.findOneBy({ md5: ps.md5, diff --git a/packages/backend/src/server/api/endpoints/drive/files/create.ts b/packages/backend/src/server/api/endpoints/drive/files/create.ts index 32225dfb1..9be42b616 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/create.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/create.ts @@ -76,7 +76,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define( meta, paramDef, diff --git a/packages/backend/src/server/api/endpoints/drive/files/delete.ts b/packages/backend/src/server/api/endpoints/drive/files/delete.ts index 37e63146f..5eaf507fc 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/delete.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/delete.ts @@ -36,7 +36,7 @@ export const paramDef = { required: ["fileId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const file = await DriveFiles.findOneBy({ id: ps.fileId }); diff --git a/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts b/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts index 1bd396848..8671326fe 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts @@ -31,7 +31,7 @@ export const paramDef = { required: ["md5"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const files = await DriveFiles.findBy({ md5: ps.md5, diff --git a/packages/backend/src/server/api/endpoints/drive/files/find.ts b/packages/backend/src/server/api/endpoints/drive/files/find.ts index fcc7bca03..88bd8c485 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/find.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/find.ts @@ -38,7 +38,7 @@ export const paramDef = { required: ["name"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const files = await DriveFiles.findBy({ name: ps.name, diff --git a/packages/backend/src/server/api/endpoints/drive/files/show.ts b/packages/backend/src/server/api/endpoints/drive/files/show.ts index 4147f44dc..13c9b8fc2 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/show.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/show.ts @@ -52,7 +52,7 @@ export const paramDef = { ], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { let file: DriveFile | null = null; diff --git a/packages/backend/src/server/api/endpoints/drive/files/update.ts b/packages/backend/src/server/api/endpoints/drive/files/update.ts index 60613641a..337324181 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/update.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/update.ts @@ -59,7 +59,7 @@ export const paramDef = { required: ["fileId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const file = await DriveFiles.findOneBy({ id: ps.fileId }); diff --git a/packages/backend/src/server/api/endpoints/drive/files/upload-from-url.ts b/packages/backend/src/server/api/endpoints/drive/files/upload-from-url.ts index bbcee8562..049fb17db 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/upload-from-url.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/upload-from-url.ts @@ -38,7 +38,7 @@ export const paramDef = { required: ["url"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { uploadFromUrl({ url: ps.url, diff --git a/packages/backend/src/server/api/endpoints/drive/folders.ts b/packages/backend/src/server/api/endpoints/drive/folders.ts index 98642d8bf..89123e805 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders.ts @@ -38,7 +38,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( DriveFolders.createQueryBuilder("folder"), diff --git a/packages/backend/src/server/api/endpoints/drive/folders/create.ts b/packages/backend/src/server/api/endpoints/drive/folders/create.ts index db9703522..935c2377b 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/create.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/create.ts @@ -36,7 +36,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // If the parent folder is specified let parent = null; diff --git a/packages/backend/src/server/api/endpoints/drive/folders/delete.ts b/packages/backend/src/server/api/endpoints/drive/folders/delete.ts index 2d03a5c2c..e8f1f7b76 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/delete.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/delete.ts @@ -33,7 +33,7 @@ export const paramDef = { required: ["folderId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // Get folder const folder = await DriveFolders.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/drive/folders/find.ts b/packages/backend/src/server/api/endpoints/drive/folders/find.ts index ab0ccce8e..c43b6e147 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/find.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/find.ts @@ -36,7 +36,7 @@ export const paramDef = { required: ["name"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const folders = await DriveFolders.findBy({ name: ps.name, diff --git a/packages/backend/src/server/api/endpoints/drive/folders/show.ts b/packages/backend/src/server/api/endpoints/drive/folders/show.ts index 6655c2336..e3cc85022 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/show.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/show.ts @@ -33,7 +33,7 @@ export const paramDef = { required: ["folderId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // Get folder const folder = await DriveFolders.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/drive/folders/update.ts b/packages/backend/src/server/api/endpoints/drive/folders/update.ts index f720c2e99..16abf9fdc 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/update.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/update.ts @@ -48,7 +48,7 @@ export const paramDef = { required: ["folderId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // Fetch folder const folder = await DriveFolders.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/drive/stream.ts b/packages/backend/src/server/api/endpoints/drive/stream.ts index 6effba741..462656255 100644 --- a/packages/backend/src/server/api/endpoints/drive/stream.ts +++ b/packages/backend/src/server/api/endpoints/drive/stream.ts @@ -36,7 +36,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( DriveFiles.createQueryBuilder("file"), diff --git a/packages/backend/src/server/api/endpoints/email-address/available.ts b/packages/backend/src/server/api/endpoints/email-address/available.ts index c16b0b4d2..4dd846a3b 100644 --- a/packages/backend/src/server/api/endpoints/email-address/available.ts +++ b/packages/backend/src/server/api/endpoints/email-address/available.ts @@ -33,7 +33,7 @@ export const paramDef = { required: ["emailAddress"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { return await validateEmailForAccount(ps.emailAddress); }); diff --git a/packages/backend/src/server/api/endpoints/endpoint.ts b/packages/backend/src/server/api/endpoints/endpoint.ts index 2e4ff909f..d4ccd68f5 100644 --- a/packages/backend/src/server/api/endpoints/endpoint.ts +++ b/packages/backend/src/server/api/endpoints/endpoint.ts @@ -15,7 +15,7 @@ export const paramDef = { required: ["endpoint"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const ep = endpoints.find((x) => x.name === ps.endpoint); if (ep == null) return null; diff --git a/packages/backend/src/server/api/endpoints/endpoints.ts b/packages/backend/src/server/api/endpoints/endpoints.ts index 748de95e5..440586a32 100644 --- a/packages/backend/src/server/api/endpoints/endpoints.ts +++ b/packages/backend/src/server/api/endpoints/endpoints.ts @@ -30,7 +30,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async () => { return endpoints.map((x) => x.name); }); diff --git a/packages/backend/src/server/api/endpoints/export-custom-emojis.ts b/packages/backend/src/server/api/endpoints/export-custom-emojis.ts index dfcb5acc4..d3f498230 100644 --- a/packages/backend/src/server/api/endpoints/export-custom-emojis.ts +++ b/packages/backend/src/server/api/endpoints/export-custom-emojis.ts @@ -17,7 +17,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { createExportCustomEmojisJob(user); }); diff --git a/packages/backend/src/server/api/endpoints/federation/followers.ts b/packages/backend/src/server/api/endpoints/federation/followers.ts index b2ce9dfd9..d241f9fd4 100644 --- a/packages/backend/src/server/api/endpoints/federation/followers.ts +++ b/packages/backend/src/server/api/endpoints/federation/followers.ts @@ -33,7 +33,7 @@ export const paramDef = { required: ["host"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const query = makePaginationQuery( Followings.createQueryBuilder("following"), diff --git a/packages/backend/src/server/api/endpoints/federation/following.ts b/packages/backend/src/server/api/endpoints/federation/following.ts index 2a05b7303..8ccacdbc6 100644 --- a/packages/backend/src/server/api/endpoints/federation/following.ts +++ b/packages/backend/src/server/api/endpoints/federation/following.ts @@ -33,7 +33,7 @@ export const paramDef = { required: ["host"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const query = makePaginationQuery( Followings.createQueryBuilder("following"), diff --git a/packages/backend/src/server/api/endpoints/federation/instances.ts b/packages/backend/src/server/api/endpoints/federation/instances.ts index cd3697b1c..811948c0f 100644 --- a/packages/backend/src/server/api/endpoints/federation/instances.ts +++ b/packages/backend/src/server/api/endpoints/federation/instances.ts @@ -43,7 +43,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const query = Instances.createQueryBuilder("instance"); diff --git a/packages/backend/src/server/api/endpoints/federation/show-instance.ts b/packages/backend/src/server/api/endpoints/federation/show-instance.ts index 0bac6f810..aa776acdd 100644 --- a/packages/backend/src/server/api/endpoints/federation/show-instance.ts +++ b/packages/backend/src/server/api/endpoints/federation/show-instance.ts @@ -29,7 +29,7 @@ export const paramDef = { required: ["host"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const instance = await Instances.findOneBy({ host: toPuny(ps.host) }); diff --git a/packages/backend/src/server/api/endpoints/federation/stats.ts b/packages/backend/src/server/api/endpoints/federation/stats.ts index 893bc1f6b..030d9f94a 100644 --- a/packages/backend/src/server/api/endpoints/federation/stats.ts +++ b/packages/backend/src/server/api/endpoints/federation/stats.ts @@ -20,7 +20,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const [topSubInstances, topPubInstances, allSubCount, allPubCount] = await Promise.all([ diff --git a/packages/backend/src/server/api/endpoints/federation/update-remote-user.ts b/packages/backend/src/server/api/endpoints/federation/update-remote-user.ts index ca2990d58..ac78dee22 100644 --- a/packages/backend/src/server/api/endpoints/federation/update-remote-user.ts +++ b/packages/backend/src/server/api/endpoints/federation/update-remote-user.ts @@ -16,7 +16,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const user = await getRemoteUser(ps.userId); await updatePerson(user.uri!); diff --git a/packages/backend/src/server/api/endpoints/federation/users.ts b/packages/backend/src/server/api/endpoints/federation/users.ts index 6a28bdfc9..8857619bc 100644 --- a/packages/backend/src/server/api/endpoints/federation/users.ts +++ b/packages/backend/src/server/api/endpoints/federation/users.ts @@ -32,7 +32,7 @@ export const paramDef = { required: ["host"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const query = makePaginationQuery( Users.createQueryBuilder("user"), diff --git a/packages/backend/src/server/api/endpoints/fetch-rss.ts b/packages/backend/src/server/api/endpoints/fetch-rss.ts index 541e74286..1698f4b64 100644 --- a/packages/backend/src/server/api/endpoints/fetch-rss.ts +++ b/packages/backend/src/server/api/endpoints/fetch-rss.ts @@ -21,7 +21,7 @@ export const paramDef = { required: ["url"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const res = await getResponse({ url: ps.url, diff --git a/packages/backend/src/server/api/endpoints/following/create.ts b/packages/backend/src/server/api/endpoints/following/create.ts index 489c273ae..7f9055f16 100644 --- a/packages/backend/src/server/api/endpoints/following/create.ts +++ b/packages/backend/src/server/api/endpoints/following/create.ts @@ -66,7 +66,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const follower = user; diff --git a/packages/backend/src/server/api/endpoints/following/delete.ts b/packages/backend/src/server/api/endpoints/following/delete.ts index aa01711b6..7c1762f8a 100644 --- a/packages/backend/src/server/api/endpoints/following/delete.ts +++ b/packages/backend/src/server/api/endpoints/following/delete.ts @@ -53,7 +53,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const follower = user; diff --git a/packages/backend/src/server/api/endpoints/following/invalidate.ts b/packages/backend/src/server/api/endpoints/following/invalidate.ts index e7d8da00b..d1e561e76 100644 --- a/packages/backend/src/server/api/endpoints/following/invalidate.ts +++ b/packages/backend/src/server/api/endpoints/following/invalidate.ts @@ -53,7 +53,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const followee = user; diff --git a/packages/backend/src/server/api/endpoints/following/requests/accept.ts b/packages/backend/src/server/api/endpoints/following/requests/accept.ts index 9e57ad043..cf5fcfc59 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/accept.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/accept.ts @@ -32,7 +32,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // Fetch follower const follower = await getUser(ps.userId).catch((e) => { diff --git a/packages/backend/src/server/api/endpoints/following/requests/cancel.ts b/packages/backend/src/server/api/endpoints/following/requests/cancel.ts index 7e7f9fe49..b62504f4b 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/cancel.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/cancel.ts @@ -42,7 +42,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // Fetch followee const followee = await getUser(ps.userId).catch((e) => { diff --git a/packages/backend/src/server/api/endpoints/following/requests/list.ts b/packages/backend/src/server/api/endpoints/following/requests/list.ts index 79c021e60..20e6fe87c 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/list.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/list.ts @@ -46,7 +46,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const reqs = await FollowRequests.findBy({ followeeId: user.id, diff --git a/packages/backend/src/server/api/endpoints/following/requests/reject.ts b/packages/backend/src/server/api/endpoints/following/requests/reject.ts index 4a7bb9851..4b9d5cc37 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/reject.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/reject.ts @@ -27,7 +27,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // Fetch follower const follower = await getUser(ps.userId).catch((e) => { diff --git a/packages/backend/src/server/api/endpoints/gallery/featured.ts b/packages/backend/src/server/api/endpoints/gallery/featured.ts index f5852e96a..ecc37ff78 100644 --- a/packages/backend/src/server/api/endpoints/gallery/featured.ts +++ b/packages/backend/src/server/api/endpoints/gallery/featured.ts @@ -26,7 +26,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const query = GalleryPosts.createQueryBuilder("post") .andWhere("post.createdAt > :date", { diff --git a/packages/backend/src/server/api/endpoints/gallery/popular.ts b/packages/backend/src/server/api/endpoints/gallery/popular.ts index 458e99c31..6deda43b6 100644 --- a/packages/backend/src/server/api/endpoints/gallery/popular.ts +++ b/packages/backend/src/server/api/endpoints/gallery/popular.ts @@ -26,7 +26,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const query = GalleryPosts.createQueryBuilder("post") .andWhere("post.likedCount > 0") diff --git a/packages/backend/src/server/api/endpoints/gallery/posts.ts b/packages/backend/src/server/api/endpoints/gallery/posts.ts index ae4c04cd6..b254882fc 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts.ts @@ -29,7 +29,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const query = makePaginationQuery( GalleryPosts.createQueryBuilder("post"), diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/create.ts b/packages/backend/src/server/api/endpoints/gallery/posts/create.ts index 2b2e7afaa..b33f10b2b 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/create.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/create.ts @@ -48,7 +48,7 @@ export const paramDef = { required: ["title", "fileIds"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const files = ( await Promise.all( diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts b/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts index 42447f853..3f921b322 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts @@ -26,7 +26,7 @@ export const paramDef = { required: ["postId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const post = await GalleryPosts.findOneBy({ id: ps.postId, diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/like.ts b/packages/backend/src/server/api/endpoints/gallery/posts/like.ts index a7bfeafb2..d5b6eb4e1 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/like.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/like.ts @@ -33,7 +33,7 @@ export const paramDef = { required: ["postId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const post = await GalleryPosts.findOneBy({ id: ps.postId }); if (post == null) { diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/show.ts b/packages/backend/src/server/api/endpoints/gallery/posts/show.ts index 4bb577065..be4cc07c3 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/show.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/show.ts @@ -32,7 +32,7 @@ export const paramDef = { required: ["postId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const post = await GalleryPosts.findOneBy({ id: ps.postId, diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts b/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts index be6dec648..6c0713f1e 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts @@ -32,7 +32,7 @@ export const paramDef = { required: ["postId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const post = await GalleryPosts.findOneBy({ id: ps.postId }); if (post == null) { diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/update.ts b/packages/backend/src/server/api/endpoints/gallery/posts/update.ts index 428dd72e8..6c27a33c1 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/update.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/update.ts @@ -48,7 +48,7 @@ export const paramDef = { required: ["postId", "title", "fileIds"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const files = ( await Promise.all( diff --git a/packages/backend/src/server/api/endpoints/get-online-users-count.ts b/packages/backend/src/server/api/endpoints/get-online-users-count.ts index 8e9b271f0..5b5947edd 100644 --- a/packages/backend/src/server/api/endpoints/get-online-users-count.ts +++ b/packages/backend/src/server/api/endpoints/get-online-users-count.ts @@ -16,7 +16,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async () => { const count = await Users.countBy({ lastActiveDate: MoreThan(new Date(Date.now() - USER_ONLINE_THRESHOLD)), diff --git a/packages/backend/src/server/api/endpoints/hashtags/list.ts b/packages/backend/src/server/api/endpoints/hashtags/list.ts index 9fb61e2cc..9eac07474 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/list.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/list.ts @@ -48,7 +48,7 @@ export const paramDef = { required: ["sort"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const query = Hashtags.createQueryBuilder("tag"); diff --git a/packages/backend/src/server/api/endpoints/hashtags/search.ts b/packages/backend/src/server/api/endpoints/hashtags/search.ts index 2a57c025f..f16816413 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/search.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/search.ts @@ -29,7 +29,7 @@ export const paramDef = { required: ["query"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const hashtags = await Hashtags.createQueryBuilder("tag") .where("tag.name like :q", { q: `${ps.query.toLowerCase()}%` }) diff --git a/packages/backend/src/server/api/endpoints/hashtags/show.ts b/packages/backend/src/server/api/endpoints/hashtags/show.ts index 9ac421a3b..beed39da6 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/show.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/show.ts @@ -33,7 +33,7 @@ export const paramDef = { required: ["tag"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const hashtag = await Hashtags.findOneBy({ name: normalizeForSearch(ps.tag), diff --git a/packages/backend/src/server/api/endpoints/hashtags/trend.ts b/packages/backend/src/server/api/endpoints/hashtags/trend.ts index a02ef5400..5b34a1cfd 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/trend.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/trend.ts @@ -66,7 +66,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async () => { const instance = await fetchMeta(true); const hiddenTags = instance.hiddenTags.map((t) => normalizeForSearch(t)); diff --git a/packages/backend/src/server/api/endpoints/hashtags/users.ts b/packages/backend/src/server/api/endpoints/hashtags/users.ts index 509bddc78..0fafdfd86 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/users.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/users.ts @@ -47,7 +47,7 @@ export const paramDef = { required: ["tag", "sort"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const query = Users.createQueryBuilder("user").where( ":tag = ANY(user.tags)", diff --git a/packages/backend/src/server/api/endpoints/i.ts b/packages/backend/src/server/api/endpoints/i.ts index a98a09cc8..c07ff029c 100644 --- a/packages/backend/src/server/api/endpoints/i.ts +++ b/packages/backend/src/server/api/endpoints/i.ts @@ -20,7 +20,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user, token) => { const isSecure = token == null; diff --git a/packages/backend/src/server/api/endpoints/i/2fa/done.ts b/packages/backend/src/server/api/endpoints/i/2fa/done.ts index 692deb3e7..0391de133 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/done.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/done.ts @@ -16,7 +16,7 @@ export const paramDef = { required: ["token"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const token = ps.token.replace(/\s/g, ""); diff --git a/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts b/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts index bc1faefb5..4354ac36c 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts @@ -39,7 +39,7 @@ export const paramDef = { ], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); @@ -74,7 +74,6 @@ export default define(meta, paramDef, async (ps, user) => { const flags = attestation.authData[32]; - // eslint:disable-next-line:no-bitwise if (!(flags & 1)) { throw new Error("user not present"); } diff --git a/packages/backend/src/server/api/endpoints/i/2fa/password-less.ts b/packages/backend/src/server/api/endpoints/i/2fa/password-less.ts index de98ba016..f286bdad7 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/password-less.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/password-less.ts @@ -15,7 +15,7 @@ export const paramDef = { required: ["value"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { await UserProfiles.update(user.id, { usePasswordLessLogin: ps.value, diff --git a/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts b/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts index 89aec05c0..4484524bd 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts @@ -22,7 +22,7 @@ export const paramDef = { required: ["password"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); diff --git a/packages/backend/src/server/api/endpoints/i/2fa/register.ts b/packages/backend/src/server/api/endpoints/i/2fa/register.ts index 65414bb02..919ce1dc5 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/register.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/register.ts @@ -19,7 +19,7 @@ export const paramDef = { required: ["password"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); diff --git a/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts b/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts index 4db39ded8..7fafcb609 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts @@ -18,7 +18,7 @@ export const paramDef = { required: ["password", "credentialId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); diff --git a/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts b/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts index 2c22e7598..491a89aed 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts @@ -16,7 +16,7 @@ export const paramDef = { required: ["password"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); diff --git a/packages/backend/src/server/api/endpoints/i/apps.ts b/packages/backend/src/server/api/endpoints/i/apps.ts index 398b4e424..f363b90cd 100644 --- a/packages/backend/src/server/api/endpoints/i/apps.ts +++ b/packages/backend/src/server/api/endpoints/i/apps.ts @@ -18,7 +18,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = AccessTokens.createQueryBuilder("token").where( "token.userId = :userId", diff --git a/packages/backend/src/server/api/endpoints/i/authorized-apps.ts b/packages/backend/src/server/api/endpoints/i/authorized-apps.ts index 7f065fc9c..408b987ed 100644 --- a/packages/backend/src/server/api/endpoints/i/authorized-apps.ts +++ b/packages/backend/src/server/api/endpoints/i/authorized-apps.ts @@ -17,7 +17,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // Get tokens const tokens = await AccessTokens.find({ diff --git a/packages/backend/src/server/api/endpoints/i/change-password.ts b/packages/backend/src/server/api/endpoints/i/change-password.ts index e44686ed3..a33c801db 100644 --- a/packages/backend/src/server/api/endpoints/i/change-password.ts +++ b/packages/backend/src/server/api/endpoints/i/change-password.ts @@ -17,7 +17,7 @@ export const paramDef = { required: ["currentPassword", "newPassword"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); diff --git a/packages/backend/src/server/api/endpoints/i/delete-account.ts b/packages/backend/src/server/api/endpoints/i/delete-account.ts index 566a34631..50c6d09c9 100644 --- a/packages/backend/src/server/api/endpoints/i/delete-account.ts +++ b/packages/backend/src/server/api/endpoints/i/delete-account.ts @@ -17,7 +17,7 @@ export const paramDef = { required: ["password"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); const userDetailed = await Users.findOneByOrFail({ id: user.id }); diff --git a/packages/backend/src/server/api/endpoints/i/export-blocking.ts b/packages/backend/src/server/api/endpoints/i/export-blocking.ts index eb3f92c41..a2706a08b 100644 --- a/packages/backend/src/server/api/endpoints/i/export-blocking.ts +++ b/packages/backend/src/server/api/endpoints/i/export-blocking.ts @@ -17,7 +17,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { createExportBlockingJob(user); }); diff --git a/packages/backend/src/server/api/endpoints/i/export-following.ts b/packages/backend/src/server/api/endpoints/i/export-following.ts index e88a68ec5..d99ad85e7 100644 --- a/packages/backend/src/server/api/endpoints/i/export-following.ts +++ b/packages/backend/src/server/api/endpoints/i/export-following.ts @@ -20,7 +20,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { createExportFollowingJob(user, ps.excludeMuting, ps.excludeInactive); }); diff --git a/packages/backend/src/server/api/endpoints/i/export-mute.ts b/packages/backend/src/server/api/endpoints/i/export-mute.ts index ce95df2d6..2d9610a17 100644 --- a/packages/backend/src/server/api/endpoints/i/export-mute.ts +++ b/packages/backend/src/server/api/endpoints/i/export-mute.ts @@ -17,7 +17,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { createExportMuteJob(user); }); diff --git a/packages/backend/src/server/api/endpoints/i/export-notes.ts b/packages/backend/src/server/api/endpoints/i/export-notes.ts index 8cf85e719..63a0dae50 100644 --- a/packages/backend/src/server/api/endpoints/i/export-notes.ts +++ b/packages/backend/src/server/api/endpoints/i/export-notes.ts @@ -17,7 +17,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { createExportNotesJob(user); }); diff --git a/packages/backend/src/server/api/endpoints/i/export-user-lists.ts b/packages/backend/src/server/api/endpoints/i/export-user-lists.ts index f4c423657..15558a482 100644 --- a/packages/backend/src/server/api/endpoints/i/export-user-lists.ts +++ b/packages/backend/src/server/api/endpoints/i/export-user-lists.ts @@ -17,7 +17,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { createExportUserListsJob(user); }); diff --git a/packages/backend/src/server/api/endpoints/i/favorites.ts b/packages/backend/src/server/api/endpoints/i/favorites.ts index f246f6cfe..489ff0526 100644 --- a/packages/backend/src/server/api/endpoints/i/favorites.ts +++ b/packages/backend/src/server/api/endpoints/i/favorites.ts @@ -32,7 +32,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( NoteFavorites.createQueryBuilder("favorite"), diff --git a/packages/backend/src/server/api/endpoints/i/gallery/likes.ts b/packages/backend/src/server/api/endpoints/i/gallery/likes.ts index 6b3e429c9..7601b554d 100644 --- a/packages/backend/src/server/api/endpoints/i/gallery/likes.ts +++ b/packages/backend/src/server/api/endpoints/i/gallery/likes.ts @@ -45,7 +45,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( GalleryLikes.createQueryBuilder("like"), diff --git a/packages/backend/src/server/api/endpoints/i/gallery/posts.ts b/packages/backend/src/server/api/endpoints/i/gallery/posts.ts index f6fa573aa..459fc580f 100644 --- a/packages/backend/src/server/api/endpoints/i/gallery/posts.ts +++ b/packages/backend/src/server/api/endpoints/i/gallery/posts.ts @@ -32,7 +32,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( GalleryPosts.createQueryBuilder("post"), diff --git a/packages/backend/src/server/api/endpoints/i/get-word-muted-notes-count.ts b/packages/backend/src/server/api/endpoints/i/get-word-muted-notes-count.ts index 7699cf5d4..2812cf3d4 100644 --- a/packages/backend/src/server/api/endpoints/i/get-word-muted-notes-count.ts +++ b/packages/backend/src/server/api/endpoints/i/get-word-muted-notes-count.ts @@ -28,7 +28,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { return { count: await MutedNotes.countBy({ diff --git a/packages/backend/src/server/api/endpoints/i/import-blocking.ts b/packages/backend/src/server/api/endpoints/i/import-blocking.ts index 2df138dc3..0644fa87e 100644 --- a/packages/backend/src/server/api/endpoints/i/import-blocking.ts +++ b/packages/backend/src/server/api/endpoints/i/import-blocking.ts @@ -48,7 +48,7 @@ export const paramDef = { required: ["fileId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const file = await DriveFiles.findOneBy({ id: ps.fileId }); diff --git a/packages/backend/src/server/api/endpoints/i/import-following.ts b/packages/backend/src/server/api/endpoints/i/import-following.ts index 5cb62b7b9..4786cb83e 100644 --- a/packages/backend/src/server/api/endpoints/i/import-following.ts +++ b/packages/backend/src/server/api/endpoints/i/import-following.ts @@ -47,7 +47,7 @@ export const paramDef = { required: ["fileId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const file = await DriveFiles.findOneBy({ id: ps.fileId }); diff --git a/packages/backend/src/server/api/endpoints/i/import-muting.ts b/packages/backend/src/server/api/endpoints/i/import-muting.ts index 4cf27b28b..e827456fd 100644 --- a/packages/backend/src/server/api/endpoints/i/import-muting.ts +++ b/packages/backend/src/server/api/endpoints/i/import-muting.ts @@ -48,7 +48,7 @@ export const paramDef = { required: ["fileId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const file = await DriveFiles.findOneBy({ id: ps.fileId }); diff --git a/packages/backend/src/server/api/endpoints/i/import-user-lists.ts b/packages/backend/src/server/api/endpoints/i/import-user-lists.ts index 7b30ad45d..0ff5e1ae8 100644 --- a/packages/backend/src/server/api/endpoints/i/import-user-lists.ts +++ b/packages/backend/src/server/api/endpoints/i/import-user-lists.ts @@ -47,7 +47,7 @@ export const paramDef = { required: ["fileId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const file = await DriveFiles.findOneBy({ id: ps.fileId }); diff --git a/packages/backend/src/server/api/endpoints/i/known-as.ts b/packages/backend/src/server/api/endpoints/i/known-as.ts index 27ad34236..3a28b82f9 100644 --- a/packages/backend/src/server/api/endpoints/i/known-as.ts +++ b/packages/backend/src/server/api/endpoints/i/known-as.ts @@ -49,7 +49,7 @@ export const paramDef = { required: ["alsoKnownAs"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { if (!ps.alsoKnownAs) throw new ApiError(meta.errors.noSuchUser); diff --git a/packages/backend/src/server/api/endpoints/i/move.ts b/packages/backend/src/server/api/endpoints/i/move.ts index 6e495c219..4fa0a2f94 100644 --- a/packages/backend/src/server/api/endpoints/i/move.ts +++ b/packages/backend/src/server/api/endpoints/i/move.ts @@ -91,7 +91,7 @@ function moveActivity(toUrl: string, fromUrl: string) { return renderActivity(activity); } -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { if (!ps.moveToAccount) throw new ApiError(meta.errors.noSuchMoveTarget); if (user.isAdmin) throw new ApiError(meta.errors.adminForbidden); diff --git a/packages/backend/src/server/api/endpoints/i/notifications.ts b/packages/backend/src/server/api/endpoints/i/notifications.ts index af65ad27b..0fe1dddab 100644 --- a/packages/backend/src/server/api/endpoints/i/notifications.ts +++ b/packages/backend/src/server/api/endpoints/i/notifications.ts @@ -64,7 +64,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // includeTypes が空の場合はクエリしない if (ps.includeTypes && ps.includeTypes.length === 0) { diff --git a/packages/backend/src/server/api/endpoints/i/page-likes.ts b/packages/backend/src/server/api/endpoints/i/page-likes.ts index 8400a2abd..01eb08441 100644 --- a/packages/backend/src/server/api/endpoints/i/page-likes.ts +++ b/packages/backend/src/server/api/endpoints/i/page-likes.ts @@ -43,7 +43,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( PageLikes.createQueryBuilder("like"), diff --git a/packages/backend/src/server/api/endpoints/i/pages.ts b/packages/backend/src/server/api/endpoints/i/pages.ts index 5ab1ebf04..2929a50dc 100644 --- a/packages/backend/src/server/api/endpoints/i/pages.ts +++ b/packages/backend/src/server/api/endpoints/i/pages.ts @@ -32,7 +32,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( Pages.createQueryBuilder("page"), diff --git a/packages/backend/src/server/api/endpoints/i/pin.ts b/packages/backend/src/server/api/endpoints/i/pin.ts index e6b2fd6d9..aa94e058f 100644 --- a/packages/backend/src/server/api/endpoints/i/pin.ts +++ b/packages/backend/src/server/api/endpoints/i/pin.ts @@ -46,7 +46,7 @@ export const paramDef = { required: ["noteId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { await addPinned(user, ps.noteId).catch((e) => { if (e.id === "70c4e51f-5bea-449c-a030-53bee3cce202") diff --git a/packages/backend/src/server/api/endpoints/i/read-all-messaging-messages.ts b/packages/backend/src/server/api/endpoints/i/read-all-messaging-messages.ts index 994fb6efd..8eeb9e236 100644 --- a/packages/backend/src/server/api/endpoints/i/read-all-messaging-messages.ts +++ b/packages/backend/src/server/api/endpoints/i/read-all-messaging-messages.ts @@ -16,7 +16,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // Update documents await MessagingMessages.update( diff --git a/packages/backend/src/server/api/endpoints/i/read-all-unread-notes.ts b/packages/backend/src/server/api/endpoints/i/read-all-unread-notes.ts index 43ce3ed4f..85df15a10 100644 --- a/packages/backend/src/server/api/endpoints/i/read-all-unread-notes.ts +++ b/packages/backend/src/server/api/endpoints/i/read-all-unread-notes.ts @@ -16,7 +16,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // Remove documents await NoteUnreads.delete({ diff --git a/packages/backend/src/server/api/endpoints/i/read-announcement.ts b/packages/backend/src/server/api/endpoints/i/read-announcement.ts index e15b89a16..c8797f923 100644 --- a/packages/backend/src/server/api/endpoints/i/read-announcement.ts +++ b/packages/backend/src/server/api/endpoints/i/read-announcement.ts @@ -28,7 +28,7 @@ export const paramDef = { required: ["announcementId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // Check if announcement exists const announcement = await Announcements.findOneBy({ id: ps.announcementId }); diff --git a/packages/backend/src/server/api/endpoints/i/regenerate-token.ts b/packages/backend/src/server/api/endpoints/i/regenerate-token.ts index 342d2c957..1c253ef9e 100644 --- a/packages/backend/src/server/api/endpoints/i/regenerate-token.ts +++ b/packages/backend/src/server/api/endpoints/i/regenerate-token.ts @@ -22,7 +22,7 @@ export const paramDef = { required: ["password"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const freshUser = await Users.findOneByOrFail({ id: user.id }); const oldToken = freshUser.token; diff --git a/packages/backend/src/server/api/endpoints/i/registry/get-all.ts b/packages/backend/src/server/api/endpoints/i/registry/get-all.ts index f4503c82f..0a5095167 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/get-all.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/get-all.ts @@ -22,7 +22,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = RegistryItems.createQueryBuilder("item") .where("item.domain IS NULL") diff --git a/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts b/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts index 53ce6222f..73eb92481 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts @@ -32,7 +32,7 @@ export const paramDef = { required: ["key"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = RegistryItems.createQueryBuilder("item") .where("item.domain IS NULL") diff --git a/packages/backend/src/server/api/endpoints/i/registry/get.ts b/packages/backend/src/server/api/endpoints/i/registry/get.ts index c87b1a93a..aff9806ee 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/get.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/get.ts @@ -32,7 +32,7 @@ export const paramDef = { required: ["key"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = RegistryItems.createQueryBuilder("item") .where("item.domain IS NULL") diff --git a/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts b/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts index ba2bbe09e..bf7ba6daa 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts @@ -22,7 +22,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = RegistryItems.createQueryBuilder("item") .where("item.domain IS NULL") diff --git a/packages/backend/src/server/api/endpoints/i/registry/keys.ts b/packages/backend/src/server/api/endpoints/i/registry/keys.ts index 72f84dd6c..c8c3b47c3 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/keys.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/keys.ts @@ -22,7 +22,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = RegistryItems.createQueryBuilder("item") .select("item.key") diff --git a/packages/backend/src/server/api/endpoints/i/registry/remove.ts b/packages/backend/src/server/api/endpoints/i/registry/remove.ts index e745024f2..2e17e90ed 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/remove.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/remove.ts @@ -32,7 +32,7 @@ export const paramDef = { required: ["key"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = RegistryItems.createQueryBuilder("item") .where("item.domain IS NULL") diff --git a/packages/backend/src/server/api/endpoints/i/registry/scopes.ts b/packages/backend/src/server/api/endpoints/i/registry/scopes.ts index 96e6678d4..a8d31497b 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/scopes.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/scopes.ts @@ -13,7 +13,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = RegistryItems.createQueryBuilder("item") .select("item.scope") diff --git a/packages/backend/src/server/api/endpoints/i/registry/set.ts b/packages/backend/src/server/api/endpoints/i/registry/set.ts index 16ec83d38..3519afb83 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/set.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/set.ts @@ -26,7 +26,7 @@ export const paramDef = { required: ["key", "value"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = RegistryItems.createQueryBuilder("item") .where("item.domain IS NULL") diff --git a/packages/backend/src/server/api/endpoints/i/revoke-token.ts b/packages/backend/src/server/api/endpoints/i/revoke-token.ts index da51ab852..91062b338 100644 --- a/packages/backend/src/server/api/endpoints/i/revoke-token.ts +++ b/packages/backend/src/server/api/endpoints/i/revoke-token.ts @@ -16,7 +16,7 @@ export const paramDef = { required: ["tokenId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const token = await AccessTokens.findOneBy({ id: ps.tokenId }); diff --git a/packages/backend/src/server/api/endpoints/i/signin-history.ts b/packages/backend/src/server/api/endpoints/i/signin-history.ts index da2fa23da..69b4fd979 100644 --- a/packages/backend/src/server/api/endpoints/i/signin-history.ts +++ b/packages/backend/src/server/api/endpoints/i/signin-history.ts @@ -18,7 +18,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( Signins.createQueryBuilder("signin"), diff --git a/packages/backend/src/server/api/endpoints/i/unpin.ts b/packages/backend/src/server/api/endpoints/i/unpin.ts index aeb49be16..a625fe941 100644 --- a/packages/backend/src/server/api/endpoints/i/unpin.ts +++ b/packages/backend/src/server/api/endpoints/i/unpin.ts @@ -34,7 +34,7 @@ export const paramDef = { required: ["noteId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { await removePinned(user, ps.noteId).catch((e) => { if (e.id === "b302d4cf-c050-400a-bbb3-be208681f40c") diff --git a/packages/backend/src/server/api/endpoints/i/update-email.ts b/packages/backend/src/server/api/endpoints/i/update-email.ts index e51a2c73e..a33da8fc9 100644 --- a/packages/backend/src/server/api/endpoints/i/update-email.ts +++ b/packages/backend/src/server/api/endpoints/i/update-email.ts @@ -43,7 +43,7 @@ export const paramDef = { required: ["password"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); diff --git a/packages/backend/src/server/api/endpoints/i/update.ts b/packages/backend/src/server/api/endpoints/i/update.ts index f3e13757a..5816ddf34 100644 --- a/packages/backend/src/server/api/endpoints/i/update.ts +++ b/packages/backend/src/server/api/endpoints/i/update.ts @@ -134,7 +134,7 @@ export const paramDef = { }, } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, _user, token) => { const user = await Users.findOneByOrFail({ id: _user.id }); const isSecure = token == null; diff --git a/packages/backend/src/server/api/endpoints/i/user-group-invites.ts b/packages/backend/src/server/api/endpoints/i/user-group-invites.ts index 715a04f0d..6799f6a5c 100644 --- a/packages/backend/src/server/api/endpoints/i/user-group-invites.ts +++ b/packages/backend/src/server/api/endpoints/i/user-group-invites.ts @@ -45,7 +45,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( UserGroupInvitations.createQueryBuilder("invitation"), diff --git a/packages/backend/src/server/api/endpoints/i/webhooks/create.ts b/packages/backend/src/server/api/endpoints/i/webhooks/create.ts index c3ad998c4..afa13fc75 100644 --- a/packages/backend/src/server/api/endpoints/i/webhooks/create.ts +++ b/packages/backend/src/server/api/endpoints/i/webhooks/create.ts @@ -29,7 +29,7 @@ export const paramDef = { required: ["name", "url", "secret", "on"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const webhook = await Webhooks.insert({ id: genId(), diff --git a/packages/backend/src/server/api/endpoints/i/webhooks/delete.ts b/packages/backend/src/server/api/endpoints/i/webhooks/delete.ts index 3530e959e..17c50de92 100644 --- a/packages/backend/src/server/api/endpoints/i/webhooks/delete.ts +++ b/packages/backend/src/server/api/endpoints/i/webhooks/delete.ts @@ -27,7 +27,7 @@ export const paramDef = { required: ["webhookId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const webhook = await Webhooks.findOneBy({ id: ps.webhookId, diff --git a/packages/backend/src/server/api/endpoints/i/webhooks/list.ts b/packages/backend/src/server/api/endpoints/i/webhooks/list.ts index 0691a34e1..16c244ea6 100644 --- a/packages/backend/src/server/api/endpoints/i/webhooks/list.ts +++ b/packages/backend/src/server/api/endpoints/i/webhooks/list.ts @@ -15,7 +15,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const webhooks = await Webhooks.findBy({ userId: me.id, diff --git a/packages/backend/src/server/api/endpoints/i/webhooks/show.ts b/packages/backend/src/server/api/endpoints/i/webhooks/show.ts index cb86f7226..3c8af932b 100644 --- a/packages/backend/src/server/api/endpoints/i/webhooks/show.ts +++ b/packages/backend/src/server/api/endpoints/i/webhooks/show.ts @@ -26,7 +26,7 @@ export const paramDef = { required: ["webhookId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const webhook = await Webhooks.findOneBy({ id: ps.webhookId, diff --git a/packages/backend/src/server/api/endpoints/i/webhooks/update.ts b/packages/backend/src/server/api/endpoints/i/webhooks/update.ts index 525fb9a8b..278e96ce9 100644 --- a/packages/backend/src/server/api/endpoints/i/webhooks/update.ts +++ b/packages/backend/src/server/api/endpoints/i/webhooks/update.ts @@ -39,7 +39,7 @@ export const paramDef = { required: ["webhookId", "name", "url", "secret", "on", "active"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const webhook = await Webhooks.findOneBy({ id: ps.webhookId, diff --git a/packages/backend/src/server/api/endpoints/latest-version.ts b/packages/backend/src/server/api/endpoints/latest-version.ts index 343291142..54e77734e 100644 --- a/packages/backend/src/server/api/endpoints/latest-version.ts +++ b/packages/backend/src/server/api/endpoints/latest-version.ts @@ -13,7 +13,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async () => { let tag_name; await fetch( diff --git a/packages/backend/src/server/api/endpoints/messaging/history.ts b/packages/backend/src/server/api/endpoints/messaging/history.ts index c8514deae..0c2be6b6d 100644 --- a/packages/backend/src/server/api/endpoints/messaging/history.ts +++ b/packages/backend/src/server/api/endpoints/messaging/history.ts @@ -36,7 +36,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const mute = await Mutings.findBy({ muterId: user.id, diff --git a/packages/backend/src/server/api/endpoints/messaging/messages.ts b/packages/backend/src/server/api/endpoints/messaging/messages.ts index 6edddb458..7d409b232 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages.ts @@ -79,7 +79,7 @@ export const paramDef = { ], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { if (ps.userId != null) { // Fetch recipient (user) diff --git a/packages/backend/src/server/api/endpoints/messaging/messages/create.ts b/packages/backend/src/server/api/endpoints/messaging/messages/create.ts index bb3a616ba..7311f526b 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages/create.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages/create.ts @@ -94,7 +94,7 @@ export const paramDef = { ], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { let recipientUser: User | null; let recipientGroup: UserGroup | null; diff --git a/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts b/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts index c9c0fda0f..9c6d5af79 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts @@ -34,7 +34,7 @@ export const paramDef = { required: ["messageId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const message = await MessagingMessages.findOneBy({ id: ps.messageId, diff --git a/packages/backend/src/server/api/endpoints/messaging/messages/read.ts b/packages/backend/src/server/api/endpoints/messaging/messages/read.ts index ae5d07bc3..6bbb426c5 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages/read.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages/read.ts @@ -30,7 +30,7 @@ export const paramDef = { required: ["messageId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const message = await MessagingMessages.findOneBy({ id: ps.messageId }); diff --git a/packages/backend/src/server/api/endpoints/meta.ts b/packages/backend/src/server/api/endpoints/meta.ts index 53238281d..0aadfff22 100644 --- a/packages/backend/src/server/api/endpoints/meta.ts +++ b/packages/backend/src/server/api/endpoints/meta.ts @@ -396,7 +396,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const instance = await fetchMeta(true); diff --git a/packages/backend/src/server/api/endpoints/miauth/gen-token.ts b/packages/backend/src/server/api/endpoints/miauth/gen-token.ts index 7c12b596c..0ee5803bf 100644 --- a/packages/backend/src/server/api/endpoints/miauth/gen-token.ts +++ b/packages/backend/src/server/api/endpoints/miauth/gen-token.ts @@ -42,7 +42,7 @@ export const paramDef = { required: ["session", "permission"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // Generate access token const accessToken = secureRndstr(32, true); diff --git a/packages/backend/src/server/api/endpoints/mute/create.ts b/packages/backend/src/server/api/endpoints/mute/create.ts index c43864164..8a1d075a4 100644 --- a/packages/backend/src/server/api/endpoints/mute/create.ts +++ b/packages/backend/src/server/api/endpoints/mute/create.ts @@ -48,7 +48,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const muter = user; diff --git a/packages/backend/src/server/api/endpoints/mute/delete.ts b/packages/backend/src/server/api/endpoints/mute/delete.ts index 00c4853c1..aa6078cdc 100644 --- a/packages/backend/src/server/api/endpoints/mute/delete.ts +++ b/packages/backend/src/server/api/endpoints/mute/delete.ts @@ -40,7 +40,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const muter = user; diff --git a/packages/backend/src/server/api/endpoints/mute/list.ts b/packages/backend/src/server/api/endpoints/mute/list.ts index e5413c2ae..e15296220 100644 --- a/packages/backend/src/server/api/endpoints/mute/list.ts +++ b/packages/backend/src/server/api/endpoints/mute/list.ts @@ -32,7 +32,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const query = makePaginationQuery( Mutings.createQueryBuilder("muting"), diff --git a/packages/backend/src/server/api/endpoints/my/apps.ts b/packages/backend/src/server/api/endpoints/my/apps.ts index 356b3cde0..8cee7042f 100644 --- a/packages/backend/src/server/api/endpoints/my/apps.ts +++ b/packages/backend/src/server/api/endpoints/my/apps.ts @@ -28,7 +28,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = { userId: user.id, diff --git a/packages/backend/src/server/api/endpoints/notes.ts b/packages/backend/src/server/api/endpoints/notes.ts index 4df5f8985..367f83631 100644 --- a/packages/backend/src/server/api/endpoints/notes.ts +++ b/packages/backend/src/server/api/endpoints/notes.ts @@ -34,7 +34,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const query = makePaginationQuery( Notes.createQueryBuilder("note"), diff --git a/packages/backend/src/server/api/endpoints/notes/children.ts b/packages/backend/src/server/api/endpoints/notes/children.ts index 513b37fc3..27f042c90 100644 --- a/packages/backend/src/server/api/endpoints/notes/children.ts +++ b/packages/backend/src/server/api/endpoints/notes/children.ts @@ -36,7 +36,7 @@ export const paramDef = { required: ["noteId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( Notes.createQueryBuilder("note"), diff --git a/packages/backend/src/server/api/endpoints/notes/clips.ts b/packages/backend/src/server/api/endpoints/notes/clips.ts index cdc3a388a..90cf2e8d7 100644 --- a/packages/backend/src/server/api/endpoints/notes/clips.ts +++ b/packages/backend/src/server/api/endpoints/notes/clips.ts @@ -39,7 +39,7 @@ export const paramDef = { required: ["noteId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const note = await getNote(ps.noteId, me).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/notes/conversation.ts b/packages/backend/src/server/api/endpoints/notes/conversation.ts index 7729db7db..ad1b0ee75 100644 --- a/packages/backend/src/server/api/endpoints/notes/conversation.ts +++ b/packages/backend/src/server/api/endpoints/notes/conversation.ts @@ -41,7 +41,7 @@ export const paramDef = { required: ["noteId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/notes/create.ts b/packages/backend/src/server/api/endpoints/notes/create.ts index d7649d4be..f16474305 100644 --- a/packages/backend/src/server/api/endpoints/notes/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/create.ts @@ -186,7 +186,7 @@ export const paramDef = { ], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { if (user.movedToUri != null) throw new ApiError(meta.errors.accountLocked); let visibleUsers: User[] = []; diff --git a/packages/backend/src/server/api/endpoints/notes/delete.ts b/packages/backend/src/server/api/endpoints/notes/delete.ts index 058093d3d..79706f2f2 100644 --- a/packages/backend/src/server/api/endpoints/notes/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/delete.ts @@ -41,7 +41,7 @@ export const paramDef = { required: ["noteId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/notes/favorites/create.ts b/packages/backend/src/server/api/endpoints/notes/favorites/create.ts index f6e79746a..6a377055a 100644 --- a/packages/backend/src/server/api/endpoints/notes/favorites/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/favorites/create.ts @@ -34,7 +34,7 @@ export const paramDef = { required: ["noteId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // Get favoritee const note = await getNote(ps.noteId, user).catch((err) => { diff --git a/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts b/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts index 1cb42c0bf..84219d29b 100644 --- a/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts @@ -33,7 +33,7 @@ export const paramDef = { required: ["noteId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // Get favoritee const note = await getNote(ps.noteId, user).catch((err) => { diff --git a/packages/backend/src/server/api/endpoints/notes/featured.ts b/packages/backend/src/server/api/endpoints/notes/featured.ts index ea74a7466..1c2cd8d9a 100644 --- a/packages/backend/src/server/api/endpoints/notes/featured.ts +++ b/packages/backend/src/server/api/endpoints/notes/featured.ts @@ -31,7 +31,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const max = 30; const day = 1000 * 60 * 60 * 24 * 3; // 3日前まで diff --git a/packages/backend/src/server/api/endpoints/notes/global-timeline.ts b/packages/backend/src/server/api/endpoints/notes/global-timeline.ts index 55fe29850..8ac2e87a0 100644 --- a/packages/backend/src/server/api/endpoints/notes/global-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/global-timeline.ts @@ -51,7 +51,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const m = await fetchMeta(); if (m.disableGlobalTimeline) { diff --git a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts index f2a4de352..5872af6b0 100644 --- a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts @@ -58,7 +58,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const m = await fetchMeta(); if (m.disableLocalTimeline && !user.isAdmin && !user.isModerator) { diff --git a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts index 93b3ea1c9..93a9bca63 100644 --- a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts @@ -61,7 +61,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const m = await fetchMeta(); if (m.disableLocalTimeline) { diff --git a/packages/backend/src/server/api/endpoints/notes/mentions.ts b/packages/backend/src/server/api/endpoints/notes/mentions.ts index d329faf89..72cca273f 100644 --- a/packages/backend/src/server/api/endpoints/notes/mentions.ts +++ b/packages/backend/src/server/api/endpoints/notes/mentions.ts @@ -38,7 +38,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const followingQuery = Followings.createQueryBuilder("following") .select("following.followeeId") diff --git a/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts b/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts index ff452f867..347e413cb 100644 --- a/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts +++ b/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts @@ -29,7 +29,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = Polls.createQueryBuilder("poll") .where("poll.userHost IS NULL") diff --git a/packages/backend/src/server/api/endpoints/notes/polls/vote.ts b/packages/backend/src/server/api/endpoints/notes/polls/vote.ts index fe3dfe465..17c40bc7f 100644 --- a/packages/backend/src/server/api/endpoints/notes/polls/vote.ts +++ b/packages/backend/src/server/api/endpoints/notes/polls/vote.ts @@ -74,7 +74,7 @@ export const paramDef = { required: ["noteId", "choice"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const createdAt = new Date(); diff --git a/packages/backend/src/server/api/endpoints/notes/reactions.ts b/packages/backend/src/server/api/endpoints/notes/reactions.ts index 8500e1061..44ea966f9 100644 --- a/packages/backend/src/server/api/endpoints/notes/reactions.ts +++ b/packages/backend/src/server/api/endpoints/notes/reactions.ts @@ -49,7 +49,7 @@ export const paramDef = { required: ["noteId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // check note visibility const note = await getNote(ps.noteId, user).catch((err) => { diff --git a/packages/backend/src/server/api/endpoints/notes/reactions/create.ts b/packages/backend/src/server/api/endpoints/notes/reactions/create.ts index 19b11c235..93d49681b 100644 --- a/packages/backend/src/server/api/endpoints/notes/reactions/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/reactions/create.ts @@ -46,7 +46,7 @@ export const paramDef = { required: ["noteId", "reaction"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { if (user.movedToUri != null) throw new ApiError(meta.errors.accountLocked); const note = await getNote(ps.noteId, user).catch((err) => { diff --git a/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts b/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts index b7df7bd54..98ea05c45 100644 --- a/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts @@ -40,7 +40,7 @@ export const paramDef = { required: ["noteId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts b/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts index c8dccf68d..a3c76d0b2 100644 --- a/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts @@ -61,7 +61,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const m = await fetchMeta(); if (m.disableRecommendedTimeline) { diff --git a/packages/backend/src/server/api/endpoints/notes/renotes.ts b/packages/backend/src/server/api/endpoints/notes/renotes.ts index add524d69..226c29c8e 100644 --- a/packages/backend/src/server/api/endpoints/notes/renotes.ts +++ b/packages/backend/src/server/api/endpoints/notes/renotes.ts @@ -45,7 +45,7 @@ export const paramDef = { required: ["noteId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/notes/replies.ts b/packages/backend/src/server/api/endpoints/notes/replies.ts index 86a6d0113..6a122cf8a 100644 --- a/packages/backend/src/server/api/endpoints/notes/replies.ts +++ b/packages/backend/src/server/api/endpoints/notes/replies.ts @@ -35,7 +35,7 @@ export const paramDef = { required: ["noteId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( Notes.createQueryBuilder("note"), diff --git a/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts b/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts index 926d082a4..97b0d575f 100644 --- a/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts +++ b/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts @@ -69,7 +69,7 @@ export const paramDef = { ], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const query = makePaginationQuery( Notes.createQueryBuilder("note"), diff --git a/packages/backend/src/server/api/endpoints/notes/search.ts b/packages/backend/src/server/api/endpoints/notes/search.ts index ae39b33ec..df463b972 100644 --- a/packages/backend/src/server/api/endpoints/notes/search.ts +++ b/packages/backend/src/server/api/endpoints/notes/search.ts @@ -58,7 +58,7 @@ export const paramDef = { required: ["query"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { if (es == null) { const query = makePaginationQuery( diff --git a/packages/backend/src/server/api/endpoints/notes/show.ts b/packages/backend/src/server/api/endpoints/notes/show.ts index b2785d2a8..00181977b 100644 --- a/packages/backend/src/server/api/endpoints/notes/show.ts +++ b/packages/backend/src/server/api/endpoints/notes/show.ts @@ -33,7 +33,7 @@ export const paramDef = { required: ["noteId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/notes/state.ts b/packages/backend/src/server/api/endpoints/notes/state.ts index b8c6bd694..0bad46fb0 100644 --- a/packages/backend/src/server/api/endpoints/notes/state.ts +++ b/packages/backend/src/server/api/endpoints/notes/state.ts @@ -44,7 +44,7 @@ export const paramDef = { required: ["noteId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user); diff --git a/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts b/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts index 2ae0b6bf4..1b9b7bfaa 100644 --- a/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts @@ -29,7 +29,7 @@ export const paramDef = { required: ["noteId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/notes/thread-muting/delete.ts b/packages/backend/src/server/api/endpoints/notes/thread-muting/delete.ts index 84a362cfb..00d11f6f7 100644 --- a/packages/backend/src/server/api/endpoints/notes/thread-muting/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/thread-muting/delete.ts @@ -27,7 +27,7 @@ export const paramDef = { required: ["noteId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/notes/timeline.ts b/packages/backend/src/server/api/endpoints/notes/timeline.ts index 6023cd573..1e1bbdd7b 100644 --- a/packages/backend/src/server/api/endpoints/notes/timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/timeline.ts @@ -48,7 +48,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const hasFollowing = (await Followings.count({ diff --git a/packages/backend/src/server/api/endpoints/notes/translate.ts b/packages/backend/src/server/api/endpoints/notes/translate.ts index d8556a43c..e3d3ed7a0 100644 --- a/packages/backend/src/server/api/endpoints/notes/translate.ts +++ b/packages/backend/src/server/api/endpoints/notes/translate.ts @@ -38,7 +38,7 @@ export const paramDef = { required: ["noteId", "targetLang"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/notes/unrenote.ts b/packages/backend/src/server/api/endpoints/notes/unrenote.ts index 7f3b48753..2b19f721b 100644 --- a/packages/backend/src/server/api/endpoints/notes/unrenote.ts +++ b/packages/backend/src/server/api/endpoints/notes/unrenote.ts @@ -35,7 +35,7 @@ export const paramDef = { required: ["noteId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts index 037ae2320..2a1926a84 100644 --- a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts @@ -53,7 +53,7 @@ export const paramDef = { required: ["listId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const list = await UserLists.findOneBy({ id: ps.listId, diff --git a/packages/backend/src/server/api/endpoints/notes/watching/create.ts b/packages/backend/src/server/api/endpoints/notes/watching/create.ts index 993f9afec..ecb6f9877 100644 --- a/packages/backend/src/server/api/endpoints/notes/watching/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/watching/create.ts @@ -27,7 +27,7 @@ export const paramDef = { required: ["noteId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/notes/watching/delete.ts b/packages/backend/src/server/api/endpoints/notes/watching/delete.ts index 9fe51a5e5..46ece274e 100644 --- a/packages/backend/src/server/api/endpoints/notes/watching/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/watching/delete.ts @@ -27,7 +27,7 @@ export const paramDef = { required: ["noteId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/notifications/create.ts b/packages/backend/src/server/api/endpoints/notifications/create.ts index e53c41067..544ca65cf 100644 --- a/packages/backend/src/server/api/endpoints/notifications/create.ts +++ b/packages/backend/src/server/api/endpoints/notifications/create.ts @@ -21,7 +21,7 @@ export const paramDef = { required: ["body"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user, token) => { createNotification(user.id, "app", { appAccessTokenId: token ? token.id : null, diff --git a/packages/backend/src/server/api/endpoints/notifications/mark-all-as-read.ts b/packages/backend/src/server/api/endpoints/notifications/mark-all-as-read.ts index e1cc895a6..31c04168b 100644 --- a/packages/backend/src/server/api/endpoints/notifications/mark-all-as-read.ts +++ b/packages/backend/src/server/api/endpoints/notifications/mark-all-as-read.ts @@ -17,7 +17,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // Update documents await Notifications.update( diff --git a/packages/backend/src/server/api/endpoints/notifications/read.ts b/packages/backend/src/server/api/endpoints/notifications/read.ts index f1bc86fd9..b1c036bff 100644 --- a/packages/backend/src/server/api/endpoints/notifications/read.ts +++ b/packages/backend/src/server/api/endpoints/notifications/read.ts @@ -42,7 +42,7 @@ export const paramDef = { ], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { if ("notificationId" in ps) return readNotification(user.id, [ps.notificationId]); diff --git a/packages/backend/src/server/api/endpoints/page-push.ts b/packages/backend/src/server/api/endpoints/page-push.ts index 126c79f4f..ca27a790b 100644 --- a/packages/backend/src/server/api/endpoints/page-push.ts +++ b/packages/backend/src/server/api/endpoints/page-push.ts @@ -26,7 +26,7 @@ export const paramDef = { required: ["pageId", "event"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const page = await Pages.findOneBy({ id: ps.pageId }); if (page == null) { diff --git a/packages/backend/src/server/api/endpoints/pages/create.ts b/packages/backend/src/server/api/endpoints/pages/create.ts index 1099e4d88..5b720a229 100644 --- a/packages/backend/src/server/api/endpoints/pages/create.ts +++ b/packages/backend/src/server/api/endpoints/pages/create.ts @@ -76,7 +76,7 @@ export const paramDef = { required: ["title", "name", "content", "variables", "script"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { let eyeCatchingImage = null; if (ps.eyeCatchingImageId != null) { diff --git a/packages/backend/src/server/api/endpoints/pages/delete.ts b/packages/backend/src/server/api/endpoints/pages/delete.ts index e68da8e35..4b94258c1 100644 --- a/packages/backend/src/server/api/endpoints/pages/delete.ts +++ b/packages/backend/src/server/api/endpoints/pages/delete.ts @@ -32,7 +32,7 @@ export const paramDef = { required: ["pageId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const page = await Pages.findOneBy({ id: ps.pageId }); if (page == null) { diff --git a/packages/backend/src/server/api/endpoints/pages/featured.ts b/packages/backend/src/server/api/endpoints/pages/featured.ts index 565ba5b2e..55a9b7a18 100644 --- a/packages/backend/src/server/api/endpoints/pages/featured.ts +++ b/packages/backend/src/server/api/endpoints/pages/featured.ts @@ -26,7 +26,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const query = Pages.createQueryBuilder("page") .where("page.visibility = 'public'") diff --git a/packages/backend/src/server/api/endpoints/pages/like.ts b/packages/backend/src/server/api/endpoints/pages/like.ts index eb61b8b26..ed3e3f001 100644 --- a/packages/backend/src/server/api/endpoints/pages/like.ts +++ b/packages/backend/src/server/api/endpoints/pages/like.ts @@ -33,7 +33,7 @@ export const paramDef = { required: ["pageId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const page = await Pages.findOneBy({ id: ps.pageId }); if (page == null) { diff --git a/packages/backend/src/server/api/endpoints/pages/show.ts b/packages/backend/src/server/api/endpoints/pages/show.ts index 9a079d865..c5d7b4f69 100644 --- a/packages/backend/src/server/api/endpoints/pages/show.ts +++ b/packages/backend/src/server/api/endpoints/pages/show.ts @@ -45,7 +45,7 @@ export const paramDef = { ], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { let page: Page | null = null; diff --git a/packages/backend/src/server/api/endpoints/pages/unlike.ts b/packages/backend/src/server/api/endpoints/pages/unlike.ts index 7c3760221..309215802 100644 --- a/packages/backend/src/server/api/endpoints/pages/unlike.ts +++ b/packages/backend/src/server/api/endpoints/pages/unlike.ts @@ -32,7 +32,7 @@ export const paramDef = { required: ["pageId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const page = await Pages.findOneBy({ id: ps.pageId }); if (page == null) { diff --git a/packages/backend/src/server/api/endpoints/pages/update.ts b/packages/backend/src/server/api/endpoints/pages/update.ts index a746a3e2a..298e2e133 100644 --- a/packages/backend/src/server/api/endpoints/pages/update.ts +++ b/packages/backend/src/server/api/endpoints/pages/update.ts @@ -77,7 +77,7 @@ export const paramDef = { required: ["pageId", "title", "name", "content", "variables", "script"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const page = await Pages.findOneBy({ id: ps.pageId }); if (page == null) { diff --git a/packages/backend/src/server/api/endpoints/patrons.ts b/packages/backend/src/server/api/endpoints/patrons.ts index 7a7ee25ac..9d4ff0b34 100644 --- a/packages/backend/src/server/api/endpoints/patrons.ts +++ b/packages/backend/src/server/api/endpoints/patrons.ts @@ -14,7 +14,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async () => { let patrons; await fetch( diff --git a/packages/backend/src/server/api/endpoints/ping.ts b/packages/backend/src/server/api/endpoints/ping.ts index 282c429f5..89111b2c0 100644 --- a/packages/backend/src/server/api/endpoints/ping.ts +++ b/packages/backend/src/server/api/endpoints/ping.ts @@ -25,7 +25,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async () => { return { pong: Date.now(), diff --git a/packages/backend/src/server/api/endpoints/pinned-users.ts b/packages/backend/src/server/api/endpoints/pinned-users.ts index 7a9d3b404..2bffbe116 100644 --- a/packages/backend/src/server/api/endpoints/pinned-users.ts +++ b/packages/backend/src/server/api/endpoints/pinned-users.ts @@ -30,7 +30,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const meta = await fetchMeta(); diff --git a/packages/backend/src/server/api/endpoints/promo/read.ts b/packages/backend/src/server/api/endpoints/promo/read.ts index e80e447a1..de4b12852 100644 --- a/packages/backend/src/server/api/endpoints/promo/read.ts +++ b/packages/backend/src/server/api/endpoints/promo/read.ts @@ -26,7 +26,7 @@ export const paramDef = { required: ["noteId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const note = await getNote(ps.noteId, user).catch((err) => { if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24") diff --git a/packages/backend/src/server/api/endpoints/recommended-instances.ts b/packages/backend/src/server/api/endpoints/recommended-instances.ts index ea3483036..c7c9cbc26 100644 --- a/packages/backend/src/server/api/endpoints/recommended-instances.ts +++ b/packages/backend/src/server/api/endpoints/recommended-instances.ts @@ -26,7 +26,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async () => { const meta = await fetchMeta(); const instances = await Promise.all(meta.recommendedInstances.map((x) => x)); diff --git a/packages/backend/src/server/api/endpoints/release.ts b/packages/backend/src/server/api/endpoints/release.ts index 175336914..d1c1b6dc5 100644 --- a/packages/backend/src/server/api/endpoints/release.ts +++ b/packages/backend/src/server/api/endpoints/release.ts @@ -14,7 +14,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async () => { let release; diff --git a/packages/backend/src/server/api/endpoints/request-reset-password.ts b/packages/backend/src/server/api/endpoints/request-reset-password.ts index 379ac2b5b..559764d38 100644 --- a/packages/backend/src/server/api/endpoints/request-reset-password.ts +++ b/packages/backend/src/server/api/endpoints/request-reset-password.ts @@ -33,7 +33,7 @@ export const paramDef = { required: ["username", "email"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { const user = await Users.findOneBy({ usernameLower: ps.username.toLowerCase(), diff --git a/packages/backend/src/server/api/endpoints/reset-db.ts b/packages/backend/src/server/api/endpoints/reset-db.ts index 583a54e72..a343656a8 100644 --- a/packages/backend/src/server/api/endpoints/reset-db.ts +++ b/packages/backend/src/server/api/endpoints/reset-db.ts @@ -19,7 +19,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { if (process.env.NODE_ENV !== "test") throw new Error("NODE_ENV is not a test"); diff --git a/packages/backend/src/server/api/endpoints/reset-password.ts b/packages/backend/src/server/api/endpoints/reset-password.ts index c78c11ee7..3a7b64201 100644 --- a/packages/backend/src/server/api/endpoints/reset-password.ts +++ b/packages/backend/src/server/api/endpoints/reset-password.ts @@ -23,7 +23,7 @@ export const paramDef = { required: ["token", "password"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const req = await PasswordResetRequests.findOneByOrFail({ token: ps.token, diff --git a/packages/backend/src/server/api/endpoints/server-info.ts b/packages/backend/src/server/api/endpoints/server-info.ts index 32db34e70..f40df59c6 100644 --- a/packages/backend/src/server/api/endpoints/server-info.ts +++ b/packages/backend/src/server/api/endpoints/server-info.ts @@ -15,7 +15,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async () => { const memStats = await si.mem(); const fsStats = await si.fsSize(); diff --git a/packages/backend/src/server/api/endpoints/stats.ts b/packages/backend/src/server/api/endpoints/stats.ts index a7a08dae4..7947e54af 100644 --- a/packages/backend/src/server/api/endpoints/stats.ts +++ b/packages/backend/src/server/api/endpoints/stats.ts @@ -59,7 +59,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async () => { const [ notesCount, diff --git a/packages/backend/src/server/api/endpoints/sw/register.ts b/packages/backend/src/server/api/endpoints/sw/register.ts index 3ad713490..bff60bc69 100644 --- a/packages/backend/src/server/api/endpoints/sw/register.ts +++ b/packages/backend/src/server/api/endpoints/sw/register.ts @@ -40,7 +40,7 @@ export const paramDef = { required: ["endpoint", "auth", "publickey"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // if already subscribed const exist = await SwSubscriptions.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/sw/unregister.ts b/packages/backend/src/server/api/endpoints/sw/unregister.ts index 9335e43f4..9e84bd37e 100644 --- a/packages/backend/src/server/api/endpoints/sw/unregister.ts +++ b/packages/backend/src/server/api/endpoints/sw/unregister.ts @@ -17,7 +17,7 @@ export const paramDef = { required: ["endpoint"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { await SwSubscriptions.delete({ userId: user.id, diff --git a/packages/backend/src/server/api/endpoints/test.ts b/packages/backend/src/server/api/endpoints/test.ts index 9c173296a..948820a0b 100644 --- a/packages/backend/src/server/api/endpoints/test.ts +++ b/packages/backend/src/server/api/endpoints/test.ts @@ -20,7 +20,7 @@ export const paramDef = { required: ["required"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { return ps; }); diff --git a/packages/backend/src/server/api/endpoints/username/available.ts b/packages/backend/src/server/api/endpoints/username/available.ts index cee4dcb70..1350085ec 100644 --- a/packages/backend/src/server/api/endpoints/username/available.ts +++ b/packages/backend/src/server/api/endpoints/username/available.ts @@ -29,7 +29,7 @@ export const paramDef = { required: ["username"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps) => { // Get exist const exist = await Users.countBy({ diff --git a/packages/backend/src/server/api/endpoints/users.ts b/packages/backend/src/server/api/endpoints/users.ts index f252f013f..3f03f0cc9 100644 --- a/packages/backend/src/server/api/endpoints/users.ts +++ b/packages/backend/src/server/api/endpoints/users.ts @@ -58,7 +58,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const query = Users.createQueryBuilder("user"); query.where("user.isExplorable = TRUE"); diff --git a/packages/backend/src/server/api/endpoints/users/clips.ts b/packages/backend/src/server/api/endpoints/users/clips.ts index 4e1a10660..497baef88 100644 --- a/packages/backend/src/server/api/endpoints/users/clips.ts +++ b/packages/backend/src/server/api/endpoints/users/clips.ts @@ -32,7 +32,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( Clips.createQueryBuilder("clip"), diff --git a/packages/backend/src/server/api/endpoints/users/followers.ts b/packages/backend/src/server/api/endpoints/users/followers.ts index dd3de04c1..b116c369e 100644 --- a/packages/backend/src/server/api/endpoints/users/followers.ts +++ b/packages/backend/src/server/api/endpoints/users/followers.ts @@ -68,7 +68,7 @@ export const paramDef = { ], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const user = await Users.findOneBy( ps.userId != null diff --git a/packages/backend/src/server/api/endpoints/users/following.ts b/packages/backend/src/server/api/endpoints/users/following.ts index 9b71a1589..ac1618ba4 100644 --- a/packages/backend/src/server/api/endpoints/users/following.ts +++ b/packages/backend/src/server/api/endpoints/users/following.ts @@ -68,7 +68,7 @@ export const paramDef = { ], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const user = await Users.findOneBy( ps.userId != null diff --git a/packages/backend/src/server/api/endpoints/users/gallery/posts.ts b/packages/backend/src/server/api/endpoints/users/gallery/posts.ts index 78b085896..ddb547256 100644 --- a/packages/backend/src/server/api/endpoints/users/gallery/posts.ts +++ b/packages/backend/src/server/api/endpoints/users/gallery/posts.ts @@ -32,7 +32,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( GalleryPosts.createQueryBuilder("post"), diff --git a/packages/backend/src/server/api/endpoints/users/get-frequently-replied-users.ts b/packages/backend/src/server/api/endpoints/users/get-frequently-replied-users.ts index 827606b8e..1d269981f 100644 --- a/packages/backend/src/server/api/endpoints/users/get-frequently-replied-users.ts +++ b/packages/backend/src/server/api/endpoints/users/get-frequently-replied-users.ts @@ -56,7 +56,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { // Lookup user const user = await getUser(ps.userId).catch((e) => { diff --git a/packages/backend/src/server/api/endpoints/users/groups/create.ts b/packages/backend/src/server/api/endpoints/users/groups/create.ts index 8abed8358..26fd2ca80 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/create.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/create.ts @@ -29,7 +29,7 @@ export const paramDef = { required: ["name"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const userGroup = await UserGroups.insert({ id: genId(), diff --git a/packages/backend/src/server/api/endpoints/users/groups/delete.ts b/packages/backend/src/server/api/endpoints/users/groups/delete.ts index 4019c7a2e..477704c65 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/delete.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/delete.ts @@ -28,7 +28,7 @@ export const paramDef = { required: ["groupId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const userGroup = await UserGroups.findOneBy({ id: ps.groupId, diff --git a/packages/backend/src/server/api/endpoints/users/groups/invitations/accept.ts b/packages/backend/src/server/api/endpoints/users/groups/invitations/accept.ts index 5d7db3e91..f7ca6e9ab 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/invitations/accept.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/invitations/accept.ts @@ -30,7 +30,7 @@ export const paramDef = { required: ["invitationId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // Fetch the invitation const invitation = await UserGroupInvitations.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/users/groups/invitations/reject.ts b/packages/backend/src/server/api/endpoints/users/groups/invitations/reject.ts index 33f4c6b54..705b5fd66 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/invitations/reject.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/invitations/reject.ts @@ -29,7 +29,7 @@ export const paramDef = { required: ["invitationId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // Fetch the invitation const invitation = await UserGroupInvitations.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/users/groups/invite.ts b/packages/backend/src/server/api/endpoints/users/groups/invite.ts index ba84f67ed..c7807fb89 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/invite.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/invite.ts @@ -55,7 +55,7 @@ export const paramDef = { required: ["groupId", "userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { // Fetch the group const userGroup = await UserGroups.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/users/groups/joined.ts b/packages/backend/src/server/api/endpoints/users/groups/joined.ts index ada810a6a..3e9c97e2a 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/joined.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/joined.ts @@ -30,7 +30,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const ownedGroups = await UserGroups.findBy({ userId: me.id, diff --git a/packages/backend/src/server/api/endpoints/users/groups/leave.ts b/packages/backend/src/server/api/endpoints/users/groups/leave.ts index e52fb639e..835a9dee1 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/leave.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/leave.ts @@ -35,7 +35,7 @@ export const paramDef = { required: ["groupId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { // Fetch the group const userGroup = await UserGroups.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/users/groups/owned.ts b/packages/backend/src/server/api/endpoints/users/groups/owned.ts index 52a00d6f1..a6b7b7b2a 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/owned.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/owned.ts @@ -29,7 +29,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const userGroups = await UserGroups.findBy({ userId: me.id, diff --git a/packages/backend/src/server/api/endpoints/users/groups/pull.ts b/packages/backend/src/server/api/endpoints/users/groups/pull.ts index 9ee02a2d3..fbab19cc7 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/pull.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/pull.ts @@ -43,7 +43,7 @@ export const paramDef = { required: ["groupId", "userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { // Fetch the group const userGroup = await UserGroups.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/users/groups/show.ts b/packages/backend/src/server/api/endpoints/users/groups/show.ts index 98e04d636..69e77c6e8 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/show.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/show.ts @@ -35,7 +35,7 @@ export const paramDef = { required: ["groupId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { // Fetch the group const userGroup = await UserGroups.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/users/groups/transfer.ts b/packages/backend/src/server/api/endpoints/users/groups/transfer.ts index b2a1c8855..534ad6e31 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/transfer.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/transfer.ts @@ -50,7 +50,7 @@ export const paramDef = { required: ["groupId", "userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { // Fetch the group const userGroup = await UserGroups.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/users/groups/update.ts b/packages/backend/src/server/api/endpoints/users/groups/update.ts index b45bd3ddc..4bab9d28e 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/update.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/update.ts @@ -36,7 +36,7 @@ export const paramDef = { required: ["groupId", "name"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { // Fetch the group const userGroup = await UserGroups.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/users/lists/create.ts b/packages/backend/src/server/api/endpoints/users/lists/create.ts index a2ec91748..89537e40b 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/create.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/create.ts @@ -28,7 +28,7 @@ export const paramDef = { required: ["name"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const userList = await UserLists.insert({ id: genId(), diff --git a/packages/backend/src/server/api/endpoints/users/lists/delete-all.ts b/packages/backend/src/server/api/endpoints/users/lists/delete-all.ts index c7bc18c2b..cf0f081af 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/delete-all.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/delete-all.ts @@ -24,7 +24,7 @@ export const paramDef = { type: "object", } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { while ((await UserLists.findOneBy({ userId: user.id })) != null) { const userList = await UserLists.findOneBy({ userId: user.id }); diff --git a/packages/backend/src/server/api/endpoints/users/lists/delete.ts b/packages/backend/src/server/api/endpoints/users/lists/delete.ts index bf0595be9..b36bb4aa1 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/delete.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/delete.ts @@ -28,7 +28,7 @@ export const paramDef = { required: ["listId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const userList = await UserLists.findOneBy({ id: ps.listId, diff --git a/packages/backend/src/server/api/endpoints/users/lists/list.ts b/packages/backend/src/server/api/endpoints/users/lists/list.ts index 3539b80c8..c8464437a 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/list.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/list.ts @@ -29,7 +29,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const userLists = await UserLists.findBy({ userId: me.id, diff --git a/packages/backend/src/server/api/endpoints/users/lists/pull.ts b/packages/backend/src/server/api/endpoints/users/lists/pull.ts index ee71f9719..ccd14faaf 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/pull.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/pull.ts @@ -37,7 +37,7 @@ export const paramDef = { required: ["listId", "userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { // Fetch the list const userList = await UserLists.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/users/lists/push.ts b/packages/backend/src/server/api/endpoints/users/lists/push.ts index fb4edc886..9af5d3157 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/push.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/push.ts @@ -50,7 +50,7 @@ export const paramDef = { required: ["listId", "userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { // Fetch the list const userList = await UserLists.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/users/lists/show.ts b/packages/backend/src/server/api/endpoints/users/lists/show.ts index a5b472153..12b91d8d1 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/show.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/show.ts @@ -35,7 +35,7 @@ export const paramDef = { required: ["listId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { // Fetch the list const userList = await UserLists.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/users/lists/update.ts b/packages/backend/src/server/api/endpoints/users/lists/update.ts index da39bc881..ff074dd81 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/update.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/update.ts @@ -36,7 +36,7 @@ export const paramDef = { required: ["listId", "name"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { // Fetch the list const userList = await UserLists.findOneBy({ diff --git a/packages/backend/src/server/api/endpoints/users/notes.ts b/packages/backend/src/server/api/endpoints/users/notes.ts index 100a17a81..b2815b39d 100644 --- a/packages/backend/src/server/api/endpoints/users/notes.ts +++ b/packages/backend/src/server/api/endpoints/users/notes.ts @@ -58,7 +58,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { // Lookup user const user = await getUser(ps.userId).catch((e) => { diff --git a/packages/backend/src/server/api/endpoints/users/pages.ts b/packages/backend/src/server/api/endpoints/users/pages.ts index 9afcd4c48..dc6d044d9 100644 --- a/packages/backend/src/server/api/endpoints/users/pages.ts +++ b/packages/backend/src/server/api/endpoints/users/pages.ts @@ -32,7 +32,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery( Pages.createQueryBuilder("page"), diff --git a/packages/backend/src/server/api/endpoints/users/reactions.ts b/packages/backend/src/server/api/endpoints/users/reactions.ts index d5e31b6f6..545f41549 100644 --- a/packages/backend/src/server/api/endpoints/users/reactions.ts +++ b/packages/backend/src/server/api/endpoints/users/reactions.ts @@ -46,7 +46,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const profile = await UserProfiles.findOneByOrFail({ userId: ps.userId }); diff --git a/packages/backend/src/server/api/endpoints/users/recommendation.ts b/packages/backend/src/server/api/endpoints/users/recommendation.ts index fa5dcb6c8..57df00e6f 100644 --- a/packages/backend/src/server/api/endpoints/users/recommendation.ts +++ b/packages/backend/src/server/api/endpoints/users/recommendation.ts @@ -39,7 +39,7 @@ export const paramDef = { required: [], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const query = Users.createQueryBuilder("user") .where("user.isLocked = FALSE") diff --git a/packages/backend/src/server/api/endpoints/users/relation.ts b/packages/backend/src/server/api/endpoints/users/relation.ts index dc510c220..ac61bbdd1 100644 --- a/packages/backend/src/server/api/endpoints/users/relation.ts +++ b/packages/backend/src/server/api/endpoints/users/relation.ts @@ -130,7 +130,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const ids = Array.isArray(ps.userId) ? ps.userId : [ps.userId]; diff --git a/packages/backend/src/server/api/endpoints/users/report-abuse.ts b/packages/backend/src/server/api/endpoints/users/report-abuse.ts index 4e02a1ddd..5d76fc8eb 100644 --- a/packages/backend/src/server/api/endpoints/users/report-abuse.ts +++ b/packages/backend/src/server/api/endpoints/users/report-abuse.ts @@ -45,7 +45,7 @@ export const paramDef = { required: ["userId", "comment"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { // Lookup user const user = await getUser(ps.userId).catch((e) => { diff --git a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts index 9dd1d755f..3b2af8d90 100644 --- a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts +++ b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts @@ -38,7 +38,7 @@ export const paramDef = { // TODO: avatar,bannerをJOINしたいけどエラーになる -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const activeThreshold = new Date(Date.now() - 1000 * 60 * 60 * 24 * 30); // 30日 diff --git a/packages/backend/src/server/api/endpoints/users/search.ts b/packages/backend/src/server/api/endpoints/users/search.ts index adeefefb7..39f2bd35e 100644 --- a/packages/backend/src/server/api/endpoints/users/search.ts +++ b/packages/backend/src/server/api/endpoints/users/search.ts @@ -40,7 +40,7 @@ export const paramDef = { required: ["query"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const activeThreshold = new Date(Date.now() - 1000 * 60 * 60 * 24 * 30); // 30日 diff --git a/packages/backend/src/server/api/endpoints/users/show.ts b/packages/backend/src/server/api/endpoints/users/show.ts index 294d70ce6..fb061a136 100644 --- a/packages/backend/src/server/api/endpoints/users/show.ts +++ b/packages/backend/src/server/api/endpoints/users/show.ts @@ -85,7 +85,7 @@ export const paramDef = { ], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { let user; diff --git a/packages/backend/src/server/api/endpoints/users/stats.ts b/packages/backend/src/server/api/endpoints/users/stats.ts index dea34f8bc..8107151ac 100644 --- a/packages/backend/src/server/api/endpoints/users/stats.ts +++ b/packages/backend/src/server/api/endpoints/users/stats.ts @@ -146,7 +146,7 @@ export const paramDef = { required: ["userId"], } as const; -// eslint-disable-next-line import/no-default-export + export default define(meta, paramDef, async (ps, me) => { const user = await Users.findOneBy({ id: ps.userId }); if (user == null) { diff --git a/packages/backend/src/server/file/send-drive-file.ts b/packages/backend/src/server/file/send-drive-file.ts index 772d19ae6..48b52bf4f 100644 --- a/packages/backend/src/server/file/send-drive-file.ts +++ b/packages/backend/src/server/file/send-drive-file.ts @@ -32,7 +32,7 @@ const commonReadableHandlerGenerator = ctx.set("Cache-Control", "max-age=300"); }; -// eslint-disable-next-line import/no-default-export + export default async function (ctx: Koa.Context) { const key = ctx.params.key; diff --git a/packages/backend/src/server/proxy/proxy-media.ts b/packages/backend/src/server/proxy/proxy-media.ts index 08ce0fba7..6417433c2 100644 --- a/packages/backend/src/server/proxy/proxy-media.ts +++ b/packages/backend/src/server/proxy/proxy-media.ts @@ -11,7 +11,6 @@ import { FILE_TYPE_BROWSERSAFE } from "@/const.js"; import { serverLogger } from "../index.js"; import { isMimeImage } from "@/misc/is-mime-image.js"; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export async function proxyMedia(ctx: Koa.Context) { const url = "url" in ctx.query ? ctx.query.url : `https://${ctx.params.url}`; diff --git a/packages/backend/src/server/web/boot.js b/packages/backend/src/server/web/boot.js index 9da4cfb16..f4e0707a9 100644 --- a/packages/backend/src/server/web/boot.js +++ b/packages/backend/src/server/web/boot.js @@ -281,7 +281,6 @@ `) } - // eslint-disable-next-line no-inner-declarations async function checkUpdate() { try { const res = await fetch('/api/meta', { @@ -302,7 +301,6 @@ } } - // eslint-disable-next-line no-inner-declarations function refresh() { // Clear cache (service worker) try { diff --git a/packages/backend/src/services/chart/charts/active-users.ts b/packages/backend/src/services/chart/charts/active-users.ts index 9035a784b..7a0c45cfa 100644 --- a/packages/backend/src/services/chart/charts/active-users.ts +++ b/packages/backend/src/services/chart/charts/active-users.ts @@ -11,7 +11,7 @@ const year = 1000 * 60 * 60 * 24 * 365; /** * アクティブユーザーに関するチャート */ -// eslint-disable-next-line import/no-default-export + export default class ActiveUsersChart extends Chart { constructor() { super(name, schema); diff --git a/packages/backend/src/services/chart/charts/ap-request.ts b/packages/backend/src/services/chart/charts/ap-request.ts index d587b3288..6e56be0b3 100644 --- a/packages/backend/src/services/chart/charts/ap-request.ts +++ b/packages/backend/src/services/chart/charts/ap-request.ts @@ -5,7 +5,7 @@ import { name, schema } from "./entities/ap-request.js"; /** * Chart about ActivityPub requests */ -// eslint-disable-next-line import/no-default-export + export default class ApRequestChart extends Chart { constructor() { super(name, schema); diff --git a/packages/backend/src/services/chart/charts/drive.ts b/packages/backend/src/services/chart/charts/drive.ts index 964ef9fec..9793ff79d 100644 --- a/packages/backend/src/services/chart/charts/drive.ts +++ b/packages/backend/src/services/chart/charts/drive.ts @@ -8,7 +8,7 @@ import { name, schema } from "./entities/drive.js"; /** * ドライブに関するチャート */ -// eslint-disable-next-line import/no-default-export + export default class DriveChart extends Chart { constructor() { super(name, schema); diff --git a/packages/backend/src/services/chart/charts/federation.ts b/packages/backend/src/services/chart/charts/federation.ts index 41674a11a..1a03d574d 100644 --- a/packages/backend/src/services/chart/charts/federation.ts +++ b/packages/backend/src/services/chart/charts/federation.ts @@ -7,7 +7,7 @@ import { fetchMeta } from "@/misc/fetch-meta.js"; /** * フェデレーションに関するチャート */ -// eslint-disable-next-line import/no-default-export + export default class FederationChart extends Chart { constructor() { super(name, schema); diff --git a/packages/backend/src/services/chart/charts/hashtag.ts b/packages/backend/src/services/chart/charts/hashtag.ts index 4c327cff5..0211df857 100644 --- a/packages/backend/src/services/chart/charts/hashtag.ts +++ b/packages/backend/src/services/chart/charts/hashtag.ts @@ -7,7 +7,7 @@ import { name, schema } from "./entities/hashtag.js"; /** * ハッシュタグに関するチャート */ -// eslint-disable-next-line import/no-default-export + export default class HashtagChart extends Chart { constructor() { super(name, schema, true); diff --git a/packages/backend/src/services/chart/charts/instance.ts b/packages/backend/src/services/chart/charts/instance.ts index d5bd86a09..d6e3483d8 100644 --- a/packages/backend/src/services/chart/charts/instance.ts +++ b/packages/backend/src/services/chart/charts/instance.ts @@ -9,7 +9,7 @@ import { name, schema } from "./entities/instance.js"; /** * インスタンスごとのチャート */ -// eslint-disable-next-line import/no-default-export + export default class InstanceChart extends Chart { constructor() { super(name, schema, true); diff --git a/packages/backend/src/services/chart/charts/notes.ts b/packages/backend/src/services/chart/charts/notes.ts index 181357f5b..9ec347b47 100644 --- a/packages/backend/src/services/chart/charts/notes.ts +++ b/packages/backend/src/services/chart/charts/notes.ts @@ -8,7 +8,7 @@ import { name, schema } from "./entities/notes.js"; /** * ノートに関するチャート */ -// eslint-disable-next-line import/no-default-export + export default class NotesChart extends Chart { constructor() { super(name, schema); diff --git a/packages/backend/src/services/chart/charts/per-user-drive.ts b/packages/backend/src/services/chart/charts/per-user-drive.ts index c5f002692..18589bb84 100644 --- a/packages/backend/src/services/chart/charts/per-user-drive.ts +++ b/packages/backend/src/services/chart/charts/per-user-drive.ts @@ -7,7 +7,7 @@ import { name, schema } from "./entities/per-user-drive.js"; /** * ユーザーごとのドライブに関するチャート */ -// eslint-disable-next-line import/no-default-export + export default class PerUserDriveChart extends Chart { constructor() { super(name, schema, true); diff --git a/packages/backend/src/services/chart/charts/per-user-following.ts b/packages/backend/src/services/chart/charts/per-user-following.ts index f21d01c38..3e8b576f2 100644 --- a/packages/backend/src/services/chart/charts/per-user-following.ts +++ b/packages/backend/src/services/chart/charts/per-user-following.ts @@ -8,7 +8,7 @@ import { name, schema } from "./entities/per-user-following.js"; /** * ユーザーごとのフォローに関するチャート */ -// eslint-disable-next-line import/no-default-export + export default class PerUserFollowingChart extends Chart { constructor() { super(name, schema, true); diff --git a/packages/backend/src/services/chart/charts/per-user-notes.ts b/packages/backend/src/services/chart/charts/per-user-notes.ts index c042cc71c..d0190cefd 100644 --- a/packages/backend/src/services/chart/charts/per-user-notes.ts +++ b/packages/backend/src/services/chart/charts/per-user-notes.ts @@ -8,7 +8,7 @@ import { name, schema } from "./entities/per-user-notes.js"; /** * ユーザーごとのノートに関するチャート */ -// eslint-disable-next-line import/no-default-export + export default class PerUserNotesChart extends Chart { constructor() { super(name, schema, true); diff --git a/packages/backend/src/services/chart/charts/per-user-reactions.ts b/packages/backend/src/services/chart/charts/per-user-reactions.ts index f1d3d8680..75def3de0 100644 --- a/packages/backend/src/services/chart/charts/per-user-reactions.ts +++ b/packages/backend/src/services/chart/charts/per-user-reactions.ts @@ -8,7 +8,7 @@ import { name, schema } from "./entities/per-user-reactions.js"; /** * ユーザーごとのリアクションに関するチャート */ -// eslint-disable-next-line import/no-default-export + export default class PerUserReactionsChart extends Chart { constructor() { super(name, schema, true); diff --git a/packages/backend/src/services/chart/charts/test-grouped.ts b/packages/backend/src/services/chart/charts/test-grouped.ts index 744547af5..6520099fe 100644 --- a/packages/backend/src/services/chart/charts/test-grouped.ts +++ b/packages/backend/src/services/chart/charts/test-grouped.ts @@ -5,7 +5,7 @@ import { name, schema } from "./entities/test-grouped.js"; /** * For testing */ -// eslint-disable-next-line import/no-default-export + export default class TestGroupedChart extends Chart { private total = {} as Record; diff --git a/packages/backend/src/services/chart/charts/test-intersection.ts b/packages/backend/src/services/chart/charts/test-intersection.ts index d4de290c1..0fa973861 100644 --- a/packages/backend/src/services/chart/charts/test-intersection.ts +++ b/packages/backend/src/services/chart/charts/test-intersection.ts @@ -5,7 +5,7 @@ import { name, schema } from "./entities/test-intersection.js"; /** * For testing */ -// eslint-disable-next-line import/no-default-export + export default class TestIntersectionChart extends Chart { constructor() { super(name, schema); diff --git a/packages/backend/src/services/chart/charts/test-unique.ts b/packages/backend/src/services/chart/charts/test-unique.ts index fdbf74528..095021622 100644 --- a/packages/backend/src/services/chart/charts/test-unique.ts +++ b/packages/backend/src/services/chart/charts/test-unique.ts @@ -5,7 +5,7 @@ import { name, schema } from "./entities/test-unique.js"; /** * For testing */ -// eslint-disable-next-line import/no-default-export + export default class TestUniqueChart extends Chart { constructor() { super(name, schema); diff --git a/packages/backend/src/services/chart/charts/test.ts b/packages/backend/src/services/chart/charts/test.ts index bec149a53..afdb3bf14 100644 --- a/packages/backend/src/services/chart/charts/test.ts +++ b/packages/backend/src/services/chart/charts/test.ts @@ -5,7 +5,7 @@ import { name, schema } from "./entities/test.js"; /** * For testing */ -// eslint-disable-next-line import/no-default-export + export default class TestChart extends Chart { public total = 0; // publicにするのはテストのため diff --git a/packages/backend/src/services/chart/charts/users.ts b/packages/backend/src/services/chart/charts/users.ts index 29cd9abe9..6fef9ecf7 100644 --- a/packages/backend/src/services/chart/charts/users.ts +++ b/packages/backend/src/services/chart/charts/users.ts @@ -8,7 +8,7 @@ import { name, schema } from "./entities/users.js"; /** * ユーザー数に関するチャート */ -// eslint-disable-next-line import/no-default-export + export default class UsersChart extends Chart { constructor() { super(name, schema); diff --git a/packages/backend/src/services/chart/core.ts b/packages/backend/src/services/chart/core.ts index 1ad8e6584..750a6e0ad 100644 --- a/packages/backend/src/services/chart/core.ts +++ b/packages/backend/src/services/chart/core.ts @@ -139,7 +139,7 @@ export function getJsonSchema( /** * 様々なチャートの管理を司るクラス */ -// eslint-disable-next-line import/no-default-export + export default abstract class Chart { public schema: T; diff --git a/packages/client/package.json b/packages/client/package.json index b42c79423..3922ff538 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -4,7 +4,7 @@ "scripts": { "watch": "pnpm vite build --watch --mode development", "build": "pnpm vite build", - "lint": "pnpm eslint --quiet \"src/**/*.{ts,vue}\"" + "lint": "pnpm rome check \"src/**/*.{ts,vue}\"" }, "dependencies": { "@discordapp/twemoji": "14.0.2", @@ -76,13 +76,8 @@ "@types/throttle-debounce": "5.0.0", "@types/tinycolor2": "1.4.3", "@types/uuid": "8.3.4", - "@typescript-eslint/eslint-plugin": "5.46.1", - "@typescript-eslint/parser": "5.46.1", "cross-env": "7.0.3", "cypress": "10.11.0", - "eslint": "8.31.0", - "eslint-plugin-import": "2.26.0", - "eslint-plugin-vue": "9.8.0", "rollup": "3.9.1", "start-server-and-test": "1.15.2" } diff --git a/packages/client/src/components/MkAutocomplete.vue b/packages/client/src/components/MkAutocomplete.vue index 144281e3c..ae708026e 100644 --- a/packages/client/src/components/MkAutocomplete.vue +++ b/packages/client/src/components/MkAutocomplete.vue @@ -20,7 +20,6 @@ {{ emoji.emoji }} - ({{ emoji.aliasOf }}) diff --git a/packages/client/src/components/MkChart.vue b/packages/client/src/components/MkChart.vue index c4706d53d..701deafae 100644 --- a/packages/client/src/components/MkChart.vue +++ b/packages/client/src/components/MkChart.vue @@ -8,11 +8,6 @@