Skip to content

Commit 57265da

Browse files
committed
fix: lint
1 parent 16d36e5 commit 57265da

File tree

10 files changed

+34
-19
lines changed

10 files changed

+34
-19
lines changed

apps/frontend/src/pages/servers/manage/index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script setup lang="ts">
22
import { ServersManagePageIndex } from '@modrinth/ui'
3+
34
import { useGeneratedState } from '~/composables/generated'
45
56
definePageMeta({

packages/ui/src/components/billing/ServersUpgradeModalWrapper.vue

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,22 @@ const { addNotification } = injectNotificationManager()
4848
const { labrinth, archon } = injectModrinthClient()
4949
const debug = useDebugLogger('ServersUpgradeModalWrapper')
5050
const purchaseModal = ref<InstanceType<typeof ModrinthServersPurchaseModal> | null>(null)
51+
52+
// stripe type
53+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
5154
const customer = ref<any>(null)
55+
56+
// stripe type
57+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
5258
const paymentMethods = ref<any[]>([])
5359
const selectedCurrency = ref<string>('USD')
54-
const regionPings = ref<any[]>([])
60+
61+
const regionPings = ref<
62+
{
63+
region: string
64+
ping: number
65+
}[]
66+
>([])
5567
5668
const pyroProducts = (props.products as Labrinth.Billing.Internal.Product[])
5769
.filter((p) => p?.metadata?.type === 'pyro' || p?.metadata?.type === 'medal')
@@ -61,7 +73,7 @@ const pyroProducts = (props.products as Labrinth.Billing.Internal.Product[])
6173
return aRam - bRam
6274
})
6375
64-
function handleError(err: any) {
76+
function handleError(err: unknown) {
6577
debug('Purchase modal error:', err)
6678
}
6779
@@ -112,7 +124,7 @@ const PING_COUNT = 20
112124
const PING_INTERVAL = 200
113125
const MAX_PING_TIME = 1000
114126
115-
function runPingTest(region: any, index = 1) {
127+
function runPingTest(region: Archon.Servers.v1.Region, index = 1) {
116128
if (index > 10) {
117129
regionPings.value.push({
118130
region: region.shortcode,
@@ -169,9 +181,9 @@ const dryRunResponse = ref<{
169181
const pendingDowngradeBody = ref<Labrinth.Billing.Internal.EditSubscriptionRequest | null>(null)
170182
const currentPlanFromSubscription = computed<Labrinth.Billing.Internal.Product | undefined>(() => {
171183
return subscription.value
172-
? (pyroProducts.find((p) =>
184+
? pyroProducts.find((p) =>
173185
p.prices.some((price) => price.id === subscription.value?.price_id),
174-
) ?? undefined)
186+
) ?? undefined
175187
: undefined
176188
})
177189

packages/ui/src/components/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ export { default as DropdownSelect } from './base/DropdownSelect.vue'
2323
export { default as EnvironmentIndicator } from './base/EnvironmentIndicator.vue'
2424
export { default as ErrorInformationCard } from './base/ErrorInformationCard.vue'
2525
export { default as FileInput } from './base/FileInput.vue'
26-
export { default as FilterBar } from './base/FilterBar.vue'
2726
export type { FilterBarOption } from './base/FilterBar.vue'
27+
export { default as FilterBar } from './base/FilterBar.vue'
2828
export { default as HeadingLink } from './base/HeadingLink.vue'
2929
export { default as IconSelect } from './base/IconSelect.vue'
30-
export { default as JoinedButtons } from './base/JoinedButtons.vue'
3130
export type { JoinedButtonAction } from './base/JoinedButtons.vue'
31+
export { default as JoinedButtons } from './base/JoinedButtons.vue'
3232
export { default as LoadingIndicator } from './base/LoadingIndicator.vue'
3333
export { default as ManySelect } from './base/ManySelect.vue'
3434
export { default as MarkdownEditor } from './base/MarkdownEditor.vue'
3535
export { default as OptionGroup } from './base/OptionGroup.vue'
36-
export { default as OverflowMenu } from './base/OverflowMenu.vue'
3736
export type { Option as OverflowMenuOption } from './base/OverflowMenu.vue'
37+
export { default as OverflowMenu } from './base/OverflowMenu.vue'
3838
export { default as Page } from './base/Page.vue'
3939
export { default as Pagination } from './base/Pagination.vue'
4040
export { default as PopoutMenu } from './base/PopoutMenu.vue'
@@ -69,16 +69,16 @@ export { default as CompactChart } from './chart/CompactChart.vue'
6969

7070
// Content
7171
export { default as ContentListPanel } from './content/ContentListPanel.vue'
72-
export { default as NewsArticleCard } from './content/NewsArticleCard.vue'
7372
export type { Article as NewsArticle } from './content/NewsArticleCard.vue'
73+
export { default as NewsArticleCard } from './content/NewsArticleCard.vue'
7474

7575
// Modals
7676
export { default as ConfirmModal } from './modal/ConfirmModal.vue'
7777
export { default as Modal } from './modal/Modal.vue'
7878
export { default as NewModal } from './modal/NewModal.vue'
7979
export { default as ShareModal } from './modal/ShareModal.vue'
80-
export { default as TabbedModal } from './modal/TabbedModal.vue'
8180
export type { Tab as TabbedModalTab } from './modal/TabbedModal.vue'
81+
export { default as TabbedModal } from './modal/TabbedModal.vue'
8282

8383
// Navigation
8484
export { default as Breadcrumbs } from './nav/Breadcrumbs.vue'

packages/ui/src/components/servers/ServerListing.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ import {
123123
} from '@modrinth/assets'
124124
import { useQuery } from '@tanstack/vue-query'
125125
import dayjs from 'dayjs'
126-
127126
import { computed } from 'vue'
127+
128128
import { injectModrinthClient } from '../../providers/api-client'
129129
import Avatar from '../base/Avatar.vue'
130130
import CopyCode from '../base/CopyCode.vue'
@@ -200,7 +200,7 @@ const { data: image } = useQuery({
200200
)
201201
202202
return await processImageBlob(blob, 512)
203-
} catch (downloadError) {
203+
} catch {
204204
const projectIcon = iconUrl.value
205205
if (projectIcon) {
206206
const response = await fetch(projectIcon)
@@ -237,7 +237,7 @@ const isConfiguring = computed(() => props.flows?.intro)
237237
238238
const formatDate = (d: unknown) => {
239239
try {
240-
return dayjs(d as any).format('MMMM D, YYYY')
240+
return dayjs(d as string).format('MMMM D, YYYY')
241241
} catch {
242242
return ''
243243
}

packages/ui/src/components/servers/labels/ServerGameLabel.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<script setup lang="ts">
2929
import { GameIcon } from '@modrinth/assets'
3030
import { useRoute } from 'vue-router'
31+
3132
import AutoLink from '../../base/AutoLink.vue'
3233
3334
defineProps<{

packages/ui/src/components/servers/labels/ServerInfoLabels.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import ServerSubdomainLabel from './ServerSubdomainLabel.vue'
3333
import ServerUptimeLabel from './ServerUptimeLabel.vue'
3434
3535
interface ServerInfoLabelsProps {
36+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
3637
serverData: Record<string, any>
3738
showGameLabel: boolean
3839
showLoaderLabel: boolean

packages/ui/src/components/servers/labels/ServerLoaderLabel.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535

3636
<script setup lang="ts">
3737
import { useRoute } from 'vue-router'
38+
3839
import AutoLink from '../../base/AutoLink.vue'
3940
import LoaderIcon from '../icons/LoaderIcon.vue'
4041

packages/ui/src/components/servers/marketing/MedalServerListing.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
</div>
8181
</AutoLink>
8282

83-
<div class="z-10 ml-auto" v-if="isNuxt">
83+
<div v-if="isNuxt" class="z-10 ml-auto">
8484
<ButtonStyled color="medal-promo" type="outlined" size="large">
8585
<button class="my-auto" @click="handleUpgrade"><RocketIcon /> Upgrade</button>
8686
</ButtonStyled>
@@ -128,7 +128,7 @@
128128
</template>
129129

130130
<script setup lang="ts">
131-
import { NuxtModrinthClient, type Archon } from '@modrinth/api-client'
131+
import { type Archon, NuxtModrinthClient } from '@modrinth/api-client'
132132
import {
133133
ChevronRightIcon,
134134
LoaderCircleIcon,
@@ -140,8 +140,8 @@ import {
140140
import { useQuery } from '@tanstack/vue-query'
141141
import dayjs from 'dayjs'
142142
import dayjsDuration from 'dayjs/plugin/duration'
143-
144143
import { computed, onMounted, onUnmounted, ref, watch } from 'vue'
144+
145145
import { injectModrinthClient } from '../../../providers/api-client'
146146
import AutoLink from '../../base/AutoLink.vue'
147147
import Avatar from '../../base/Avatar.vue'

packages/ui/src/pages/servers/manage/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
placeholder="Search servers..."
120120
/>
121121
</div>
122-
<ButtonStyled type="standard" v-if="isNuxt">
122+
<ButtonStyled v-if="isNuxt" type="standard">
123123
<AutoLink :to="{ path: '/servers', hash: '#plan' }">
124124
<PlusIcon />
125125
New server
@@ -172,7 +172,7 @@
172172
</template>
173173

174174
<script setup lang="ts">
175-
import { NuxtModrinthClient, type Archon, type Labrinth } from '@modrinth/api-client'
175+
import { type Archon, type Labrinth, NuxtModrinthClient } from '@modrinth/api-client'
176176
import { HammerIcon, LoaderCircleIcon, PlusIcon, SearchIcon } from '@modrinth/assets'
177177
import { AutoLink, ButtonStyled, CopyCode, injectModrinthClient } from '@modrinth/ui'
178178
import type { ModrinthServersFetchError } from '@modrinth/utils'

packages/ui/src/providers/project-page.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { Labrinth } from '@modrinth/api-client/src/modules/types'
2-
32
// TODO: api client this shit
43
import type { TeamMember } from '@modrinth/utils'
54
import type { Ref } from 'vue'

0 commit comments

Comments
 (0)