From 981cf159bf46533499852f767c9ecbaa157eed7d Mon Sep 17 00:00:00 2001 From: "Calum H. (IMB11)" Date: Fri, 1 Aug 2025 15:05:31 +0100 Subject: [PATCH] chore: fix moderation lint issues --- packages/moderation/data/checklist.ts | 8 ++++---- .../moderation/data/modpack-permissions-stage.ts | 5 +++-- packages/moderation/data/stages/categories.ts | 5 +++-- packages/moderation/data/stages/description.ts | 5 +++-- packages/moderation/data/stages/gallery.ts | 5 +++-- packages/moderation/data/stages/license.ts | 1 + packages/moderation/data/stages/links.ts | 5 +++-- packages/moderation/data/stages/reupload.ts | 5 +++-- packages/moderation/data/stages/rule-following.ts | 5 +++-- packages/moderation/data/stages/side-types.ts | 5 +++-- packages/moderation/data/stages/status-alerts.ts | 5 +++-- packages/moderation/data/stages/summary.ts | 5 +++-- packages/moderation/data/stages/title-slug.ts | 1 + .../moderation/data/stages/undefined-project.ts | 1 + packages/moderation/data/stages/versions.ts | 5 +++-- packages/moderation/index.ts | 15 +++++++-------- packages/moderation/types/actions.ts | 1 + packages/moderation/types/reports.ts | 2 +- packages/moderation/types/stage.ts | 3 ++- packages/moderation/utils.ts | 1 + 20 files changed, 52 insertions(+), 36 deletions(-) diff --git a/packages/moderation/data/checklist.ts b/packages/moderation/data/checklist.ts index 6d21e274a..607d21cc7 100644 --- a/packages/moderation/data/checklist.ts +++ b/packages/moderation/data/checklist.ts @@ -1,18 +1,18 @@ import type { Stage } from '../types/stage' import modpackPermissionsStage from './modpack-permissions-stage' import categories from './stages/categories' -import reupload from './stages/reupload' import description from './stages/description' import gallery from './stages/gallery' +import license from './stages/license' import links from './stages/links' +import reupload from './stages/reupload' import ruleFollowing from './stages/rule-following' import sideTypes from './stages/side-types' +import statusAlerts from './stages/status-alerts' import summary from './stages/summary' import titleSlug from './stages/title-slug' -import versions from './stages/versions' -import license from './stages/license' import undefinedProject from './stages/undefined-project' -import statusAlerts from './stages/status-alerts' +import versions from './stages/versions' export default [ titleSlug, diff --git a/packages/moderation/data/modpack-permissions-stage.ts b/packages/moderation/data/modpack-permissions-stage.ts index e3c7414da..fd20148e5 100644 --- a/packages/moderation/data/modpack-permissions-stage.ts +++ b/packages/moderation/data/modpack-permissions-stage.ts @@ -1,6 +1,7 @@ -import type { ModerationModpackPermissionApprovalType, Project } from '@modrinth/utils' -import type { Stage } from '../types/stage' import { PackageOpenIcon } from '@modrinth/assets' +import type { ModerationModpackPermissionApprovalType, Project } from '@modrinth/utils' + +import type { Stage } from '../types/stage' export default { id: 'modpack-permissions', diff --git a/packages/moderation/data/stages/categories.ts b/packages/moderation/data/stages/categories.ts index 324d56634..248499b21 100644 --- a/packages/moderation/data/stages/categories.ts +++ b/packages/moderation/data/stages/categories.ts @@ -1,7 +1,8 @@ -import type { Stage } from '../../types/stage' -import type { ButtonAction } from '../../types/actions' import { TagsIcon } from '@modrinth/assets' +import type { ButtonAction } from '../../types/actions' +import type { Stage } from '../../types/stage' + const categories: Stage = { title: "Are the project's tags accurate?", id: 'tags', diff --git a/packages/moderation/data/stages/description.ts b/packages/moderation/data/stages/description.ts index f68d142e6..150eb5990 100644 --- a/packages/moderation/data/stages/description.ts +++ b/packages/moderation/data/stages/description.ts @@ -1,7 +1,8 @@ -import type { Stage } from '../../types/stage' -import type { ButtonAction } from '../../types/actions' import { LibraryIcon } from '@modrinth/assets' +import type { ButtonAction } from '../../types/actions' +import type { Stage } from '../../types/stage' + const description: Stage = { title: 'Is the description sufficient, accurate, and accessible?', id: 'description', diff --git a/packages/moderation/data/stages/gallery.ts b/packages/moderation/data/stages/gallery.ts index 35eae3320..b253b2f62 100644 --- a/packages/moderation/data/stages/gallery.ts +++ b/packages/moderation/data/stages/gallery.ts @@ -1,7 +1,8 @@ -import type { Stage } from '../../types/stage' -import type { ButtonAction } from '../../types/actions' import { ImageIcon } from '@modrinth/assets' +import type { ButtonAction } from '../../types/actions' +import type { Stage } from '../../types/stage' + const gallery: Stage = { title: "Are this project's gallery images sufficient?", id: 'gallery', diff --git a/packages/moderation/data/stages/license.ts b/packages/moderation/data/stages/license.ts index 9ae50173e..10bcc99d0 100644 --- a/packages/moderation/data/stages/license.ts +++ b/packages/moderation/data/stages/license.ts @@ -1,4 +1,5 @@ import { BookTextIcon } from '@modrinth/assets' + import type { Stage } from '../../types/stage' const licensesNotRequiringSource: string[] = [ diff --git a/packages/moderation/data/stages/links.ts b/packages/moderation/data/stages/links.ts index 5cea34b5b..0ee614e12 100644 --- a/packages/moderation/data/stages/links.ts +++ b/packages/moderation/data/stages/links.ts @@ -1,7 +1,8 @@ -import type { Stage } from '../../types/stage' -import type { ButtonAction } from '../../types/actions' import { LinkIcon } from '@modrinth/assets' +import type { ButtonAction } from '../../types/actions' +import type { Stage } from '../../types/stage' + const links: Stage = { title: "Are the project's links accurate and accessible?", id: 'links', diff --git a/packages/moderation/data/stages/reupload.ts b/packages/moderation/data/stages/reupload.ts index d7a49d45e..8e10cfb5a 100644 --- a/packages/moderation/data/stages/reupload.ts +++ b/packages/moderation/data/stages/reupload.ts @@ -1,7 +1,8 @@ -import type { Stage } from '../../types/stage' -import type { ButtonAction } from '../../types/actions' import { CopyrightIcon } from '@modrinth/assets' +import type { ButtonAction } from '../../types/actions' +import type { Stage } from '../../types/stage' + const reupload: Stage = { title: 'Does the author have proper permissions to post this project?', id: 'reupload', diff --git a/packages/moderation/data/stages/rule-following.ts b/packages/moderation/data/stages/rule-following.ts index 1d382e5db..e5bc93c80 100644 --- a/packages/moderation/data/stages/rule-following.ts +++ b/packages/moderation/data/stages/rule-following.ts @@ -1,7 +1,8 @@ -import type { Stage } from '../../types/stage' -import type { ButtonAction } from '../../types/actions' import { ListBulletedIcon } from '@modrinth/assets' +import type { ButtonAction } from '../../types/actions' +import type { Stage } from '../../types/stage' + const ruleFollowing: Stage = { title: 'Does this project violate the rules?', id: 'rule-following', diff --git a/packages/moderation/data/stages/side-types.ts b/packages/moderation/data/stages/side-types.ts index 397d9d69f..2bc69fd21 100644 --- a/packages/moderation/data/stages/side-types.ts +++ b/packages/moderation/data/stages/side-types.ts @@ -1,7 +1,8 @@ -import type { Stage } from '../../types/stage' -import type { ButtonAction } from '../../types/actions' import { GlobeIcon } from '@modrinth/assets' +import type { ButtonAction } from '../../types/actions' +import type { Stage } from '../../types/stage' + const sideTypes: Stage = { title: "Is the project's environment information accurate?", id: 'environment', diff --git a/packages/moderation/data/stages/status-alerts.ts b/packages/moderation/data/stages/status-alerts.ts index 7e0d77241..0f9ab1418 100644 --- a/packages/moderation/data/stages/status-alerts.ts +++ b/packages/moderation/data/stages/status-alerts.ts @@ -1,7 +1,8 @@ -import type { Stage } from '../../types/stage' -import type { ButtonAction, DropdownAction, DropdownActionOption } from '../../types/actions' import { TriangleAlertIcon } from '@modrinth/assets' +import type { ButtonAction, DropdownAction, DropdownActionOption } from '../../types/actions' +import type { Stage } from '../../types/stage' + const statusAlerts: Stage = { title: `Is anything else affecting this project's status?`, id: 'status-alerts', diff --git a/packages/moderation/data/stages/summary.ts b/packages/moderation/data/stages/summary.ts index 72de764bc..ba96c5861 100644 --- a/packages/moderation/data/stages/summary.ts +++ b/packages/moderation/data/stages/summary.ts @@ -1,7 +1,8 @@ -import type { Stage } from '../../types/stage' -import type { ButtonAction } from '../../types/actions' import { AlignLeftIcon } from '@modrinth/assets' +import type { ButtonAction } from '../../types/actions' +import type { Stage } from '../../types/stage' + const summary: Stage = { title: "Is the project's summary sufficient?", text: async () => (await import('../messages/checklist-text/summary/summary.md?raw')).default, diff --git a/packages/moderation/data/stages/title-slug.ts b/packages/moderation/data/stages/title-slug.ts index 55d32a62c..505880e88 100644 --- a/packages/moderation/data/stages/title-slug.ts +++ b/packages/moderation/data/stages/title-slug.ts @@ -1,4 +1,5 @@ import { BookOpenIcon } from '@modrinth/assets' + import type { Stage } from '../../types/stage' import type { Project } from '@modrinth/utils' diff --git a/packages/moderation/data/stages/undefined-project.ts b/packages/moderation/data/stages/undefined-project.ts index bf729d430..405276458 100644 --- a/packages/moderation/data/stages/undefined-project.ts +++ b/packages/moderation/data/stages/undefined-project.ts @@ -1,4 +1,5 @@ import { XIcon } from '@modrinth/assets' + import type { Stage } from '../../types/stage' const undefinedProjectStage: Stage = { diff --git a/packages/moderation/data/stages/versions.ts b/packages/moderation/data/stages/versions.ts index bf8e31963..8520d6c88 100644 --- a/packages/moderation/data/stages/versions.ts +++ b/packages/moderation/data/stages/versions.ts @@ -1,7 +1,8 @@ -import type { Stage } from '../../types/stage' -import type { ButtonAction, DropdownAction, DropdownActionOption } from '../../types/actions' import { VersionIcon } from '@modrinth/assets' +import type { ButtonAction, DropdownAction, DropdownActionOption } from '../../types/actions' +import type { Stage } from '../../types/stage' + const versions: Stage = { title: "Are this project's files correct?", id: 'versions', diff --git a/packages/moderation/index.ts b/packages/moderation/index.ts index 0ee0afdf4..98205c4f2 100644 --- a/packages/moderation/index.ts +++ b/packages/moderation/index.ts @@ -1,11 +1,10 @@ -export * from './types/actions' -export * from './types/messages' -export * from './types/stage' -export * from './types/keybinds' -export * from './types/reports' -export * from './utils' - -export { finalPermissionMessages } from './data/modpack-permissions-stage' export { default as checklist } from './data/checklist' export { default as keybinds } from './data/keybinds' +export { finalPermissionMessages } from './data/modpack-permissions-stage' export { default as reportQuickReplies } from './data/report-quick-replies' +export * from './types/actions' +export * from './types/keybinds' +export * from './types/messages' +export * from './types/reports' +export * from './types/stage' +export * from './utils' diff --git a/packages/moderation/types/actions.ts b/packages/moderation/types/actions.ts index c86973158..77f5cbf27 100644 --- a/packages/moderation/types/actions.ts +++ b/packages/moderation/types/actions.ts @@ -1,4 +1,5 @@ import type { Project } from '@modrinth/utils' + import type { WeightedMessage } from './messages' export type ActionType = diff --git a/packages/moderation/types/reports.ts b/packages/moderation/types/reports.ts index c05dc348b..10bc6716a 100644 --- a/packages/moderation/types/reports.ts +++ b/packages/moderation/types/reports.ts @@ -1,4 +1,4 @@ -import type { Project, Report, Thread, User, Version, DelphiReport } from '@modrinth/utils' +import type { DelphiReport, Project, Report, Thread, User, Version } from '@modrinth/utils' export interface OwnershipTarget { name: string diff --git a/packages/moderation/types/stage.ts b/packages/moderation/types/stage.ts index 70be14708..a0147511c 100644 --- a/packages/moderation/types/stage.ts +++ b/packages/moderation/types/stage.ts @@ -1,7 +1,8 @@ import type { Project } from '@modrinth/utils' -import type { Action } from './actions' import type { FunctionalComponent, SVGAttributes } from 'vue' +import type { Action } from './actions' + /** * Represents a moderation stage with associated actions and optional navigation logic. */ diff --git a/packages/moderation/utils.ts b/packages/moderation/utils.ts index 9feb8c272..031763779 100644 --- a/packages/moderation/utils.ts +++ b/packages/moderation/utils.ts @@ -1,4 +1,5 @@ import type { Project } from '@modrinth/utils' + import type { Action, AdditionalTextInput,