Skip to content

Commit 1af0c75

Browse files
committed
fix: lint issues
1 parent bc190cb commit 1af0c75

File tree

6 files changed

+52
-50
lines changed

6 files changed

+52
-50
lines changed

apps/app-frontend/src/components/ui/world/WorldItem.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
<script setup lang="ts">
2-
import type {
3-
ProtocolVersion,
4-
ServerStatus,
5-
ServerWorld,
6-
SingleplayerWorld,
7-
World,
8-
} from '@/helpers/worlds.ts'
9-
import { getWorldIdentifier, set_world_display_status } from '@/helpers/worlds.ts'
102
import {
113
ClipboardCopyIcon,
124
EditIcon,
@@ -44,6 +36,14 @@ import { computed } from 'vue'
4436
import { useRouter } from 'vue-router'
4537
4638
import { copyToClipboard } from '@/helpers/utils'
39+
import type {
40+
ProtocolVersion,
41+
ServerStatus,
42+
ServerWorld,
43+
SingleplayerWorld,
44+
World,
45+
} from '@/helpers/worlds.ts'
46+
import { getWorldIdentifier, set_world_display_status } from '@/helpers/worlds.ts'
4747
4848
const { formatMessage } = useVIntl()
4949
const formatRelativeTime = useRelativeTime()

apps/app-frontend/src/pages/instance/Worlds.vue

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,22 @@
121121
</div>
122122
</template>
123123
<script setup lang="ts">
124-
import ContextMenu from '@/components/ui/ContextMenu.vue'
124+
import { PlusIcon, SearchIcon, SpinnerIcon, UpdatedIcon, XIcon } from '@modrinth/assets'
125+
import {
126+
Button,
127+
ButtonStyled,
128+
FilterBar,
129+
type FilterBarOption,
130+
GAME_MODES,
131+
type GameVersion,
132+
RadialHeader,
133+
} from '@modrinth/ui'
134+
import type { Version } from '@modrinth/utils'
135+
import { defineMessages } from '@vintl/vintl'
136+
import { computed, onUnmounted, ref, watch } from 'vue'
137+
import { useRoute } from 'vue-router'
138+
139+
import type ContextMenu from '@/components/ui/ContextMenu.vue'
125140
import ConfirmModalWrapper from '@/components/ui/modal/ConfirmModalWrapper.vue'
126141
import AddServerModal from '@/components/ui/world/modal/AddServerModal.vue'
127142
import EditServerModal from '@/components/ui/world/modal/EditServerModal.vue'
@@ -154,20 +169,6 @@ import {
154169
type World,
155170
} from '@/helpers/worlds.ts'
156171
import { handleError } from '@/store/notifications'
157-
import { PlusIcon, SearchIcon, SpinnerIcon, UpdatedIcon, XIcon } from '@modrinth/assets'
158-
import {
159-
Button,
160-
ButtonStyled,
161-
FilterBar,
162-
type FilterBarOption,
163-
GAME_MODES,
164-
type GameVersion,
165-
RadialHeader,
166-
} from '@modrinth/ui'
167-
import { Version } from '@modrinth/utils'
168-
import { defineMessages } from '@vintl/vintl'
169-
import { computed, onUnmounted, ref, watch } from 'vue'
170-
import { useRoute } from 'vue-router'
171172
172173
const { handleError } = injectNotificationManager()
173174
const route = useRoute()

apps/frontend/src/composables/servers/modules/general.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ import { useServersFetch } from '../servers-fetch.ts'
55
import { ServerModule } from './base.ts'
66

77
export class GeneralModule extends ServerModule implements ServerGeneral {
8-
server_id!: string;
9-
name!: string;
10-
owner_id!: string;
11-
net!: { ip: string; port: number; domain: string };
12-
game!: string;
13-
backup_quota!: number;
14-
used_backup_quota!: number;
15-
status!: string;
16-
suspension_reason!: string;
17-
loader!: string;
18-
loader_version!: string;
19-
mc_version!: string;
8+
server_id!: string
9+
name!: string
10+
owner_id!: string
11+
net!: { ip: string; port: number; domain: string }
12+
game!: string
13+
backup_quota!: number
14+
used_backup_quota!: number
15+
status!: string
16+
suspension_reason!: string
17+
loader!: string
18+
loader_version!: string
19+
mc_version!: string
2020
upstream!: {
2121
kind: 'modpack' | 'mod' | 'resourcepack'
2222
version_id: string

apps/frontend/src/composables/servers/servers-fetch.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -141,18 +141,18 @@ export async function useServersFetch<T>(
141141
}
142142

143143
const errorMessages: { [key: number]: string } = {
144-
400: "Bad Request",
145-
401: "Unauthorized",
146-
403: "Forbidden",
147-
404: "Not Found",
148-
405: "Method Not Allowed",
149-
408: "Request Timeout",
144+
400: 'Bad Request',
145+
401: 'Unauthorized',
146+
403: 'Forbidden',
147+
404: 'Not Found',
148+
405: 'Method Not Allowed',
149+
408: 'Request Timeout',
150150
429: "You're making requests too quickly. Please wait a moment and try again.",
151-
500: "Internal Server Error",
152-
502: "Bad Gateway",
153-
503: "Service Unavailable",
154-
504: "Gateway Timeout",
155-
};
151+
500: 'Internal Server Error',
152+
502: 'Bad Gateway',
153+
503: 'Service Unavailable',
154+
504: 'Gateway Timeout',
155+
}
156156

157157
const message =
158158
statusCode && statusCode in errorMessages
@@ -170,14 +170,14 @@ export async function useServersFetch<T>(
170170
`[Modrinth Servers] ${error.message}`,
171171
statusCode,
172172
error,
173-
);
173+
)
174174
throw new ModrinthServerError(
175175
`[Modrinth Servers] ${message}`,
176176
statusCode,
177177
fetchError,
178178
module,
179179
v1Error,
180-
);
180+
)
181181
}
182182

183183
const baseDelay = statusCode && statusCode >= 500 ? 5000 : 1000

apps/frontend/src/pages/servers/manage/[id]/options.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ import {
1919
WrenchIcon,
2020
} from '@modrinth/assets'
2121
import { isAdmin as isUserAdmin, type User } from '@modrinth/utils'
22-
import { ModrinthServer } from '~/composables/servers/modrinth-servers.ts'
22+
23+
import type { ModrinthServer } from '~/composables/servers/modrinth-servers.ts'
2324
import type { BackupInProgressReason } from '~/pages/servers/manage/[id].vue'
2425
2526
const route = useRoute()

packages/moderation/data/stages/title-slug.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { BookOpenIcon } from '@modrinth/assets'
2+
import type { Project } from '@modrinth/utils'
23

34
import type { Stage } from '../../types/stage'
4-
import type { Project } from '@modrinth/utils'
55

66
function hasCustomSlug(project: Project): boolean {
77
return (

0 commit comments

Comments
 (0)