chore: 修复 main 上的存量 lint 错误

pr-check.yml 只在 PR 触发,main push 不跑 lint,导致存量错误一直未被发现,
PR #675 / #676 都被 Code Quality job 拦下。

- 9 处 prettier/prettier 格式错误:StickyTabPage.vue / RadioCard.vue /
  list/index.vue / mv/index.vue / podcast/index.vue 的属性换行与 import
  排序,全部 eslint --fix 自动修复
- 1 处 no-undef ScrollToOptions(StickyTabPage.vue:79):在 eslint.config.mjs
  的 .ts 与 .vue 配置块同时补 ScrollToOptions 到 globals,与既有的
  ScrollBehavior 同级;TypeScript DOM lib 类型不在 globals.browser 里,
  需手动声明
This commit is contained in:
chengww
2026-05-17 23:54:28 +08:00
parent ee98eb0266
commit 938c497ca3
6 changed files with 27 additions and 17 deletions
+4 -2
View File
@@ -55,7 +55,8 @@ export default [
defineEmits: 'readonly',
// TypeScript 全局类型
NodeJS: 'readonly',
ScrollBehavior: 'readonly'
ScrollBehavior: 'readonly',
ScrollToOptions: 'readonly'
}
},
plugins: {
@@ -148,7 +149,8 @@ export default [
useMessage: 'readonly',
// TypeScript 全局类型
NodeJS: 'readonly',
ScrollBehavior: 'readonly'
ScrollBehavior: 'readonly',
ScrollToOptions: 'readonly'
}
},
plugins: {
@@ -4,7 +4,9 @@
<div class="w-full pb-32">
<!-- Page Header (scrolls away) -->
<div ref="headerRef" class="page-padding pt-6 pb-2">
<h1 class="mb-2 text-2xl font-bold tracking-tight text-neutral-900 md:text-3xl dark:text-white">
<h1
class="mb-2 text-2xl font-bold tracking-tight text-neutral-900 md:text-3xl dark:text-white"
>
{{ title }}
</h1>
<p v-if="description" class="text-neutral-500 dark:text-neutral-400">
@@ -23,11 +23,7 @@ const goToDetail = () => {
</script>
<template>
<div
class="group cursor-pointer animate-item"
:style="{ animationDelay }"
@click="goToDetail"
>
<div class="group cursor-pointer animate-item" :style="{ animationDelay }" @click="goToDetail">
<!-- Cover -->
<div
class="relative aspect-square overflow-hidden rounded-2xl shadow-md group-hover:shadow-xl transition-all duration-500"
+1 -1
View File
@@ -95,8 +95,8 @@ import { useRoute, useRouter } from 'vue-router';
import { getPlaylistCategory } from '@/api/home';
import { getListByCat } from '@/api/list';
import StickyTabPage from '@/components/common/StickyTabPage.vue';
import { navigateToMusicList } from '@/components/common/MusicListNavigator';
import StickyTabPage from '@/components/common/StickyTabPage.vue';
import type { IPlayListSort } from '@/types/playlist';
import { calculateAnimationDelay, formatNumber, getImgUrl } from '@/utils';
+1 -3
View File
@@ -80,9 +80,7 @@
</span>
</div>
<div v-if="!hasMore && !initLoading" class="text-center">
<span
class="text-xs text-neutral-400 font-medium tracking-widest uppercase opacity-50"
>
<span class="text-xs text-neutral-400 font-medium tracking-widest uppercase opacity-50">
{{ t('comp.pages.mv.noMore') }}
</span>
</div>
+17 -5
View File
@@ -2,7 +2,9 @@
<sticky-tab-page
ref="pageRef"
:title="currentCategoryId === -1 ? t('podcast.podcast') : currentCategoryName"
:description="currentCategoryId === -1 ? t('podcast.discover') : t('podcast.exploreCategoryRadios')"
:description="
currentCategoryId === -1 ? t('podcast.discover') : t('podcast.exploreCategoryRadios')
"
:model-value="currentCategoryId"
:categories="categoryList"
label-key="name"
@@ -34,7 +36,9 @@
<section v-if="todayPerfered.length > 0">
<div class="mb-6 flex items-center justify-between">
<div class="flex items-center gap-3">
<h2 class="text-xl font-bold tracking-tight text-neutral-900 md:text-2xl dark:text-white">
<h2
class="text-xl font-bold tracking-tight text-neutral-900 md:text-2xl dark:text-white"
>
{{ t('podcast.todayPerfered') }}
</h2>
<div class="h-1.5 w-1.5 rounded-full bg-primary" />
@@ -65,7 +69,9 @@
</div>
</div>
<div class="flex-1 min-w-0">
<h4 class="text-sm md:text-base font-semibold text-neutral-900 dark:text-white truncate">
<h4
class="text-sm md:text-base font-semibold text-neutral-900 dark:text-white truncate"
>
{{ program.mainSong?.name || program.name }}
</h4>
<p class="text-xs md:text-sm text-neutral-500 dark:text-neutral-400 truncate mt-1">
@@ -125,7 +131,10 @@
</template>
</div>
<div v-if="!categoryLoading && categoryRadios.length === 0" class="flex flex-col items-center justify-center py-20 text-neutral-400">
<div
v-if="!categoryLoading && categoryRadios.length === 0"
class="flex flex-col items-center justify-center py-20 text-neutral-400"
>
<i class="ri-radio-line mb-4 text-5xl opacity-20" />
<p class="text-sm font-medium">{{ t('podcast.noCategoryRadios') }}</p>
</div>
@@ -134,7 +143,10 @@
<n-spin size="small" />
<span class="ml-2 text-neutral-500">{{ t('common.loading') }}</span>
</div>
<div v-if="!categoryHasMore && categoryRadios.length > 0" class="text-center py-8 text-neutral-500">
<div
v-if="!categoryHasMore && categoryRadios.length > 0"
class="text-center py-8 text-neutral-500"
>
{{ t('common.noMore') }}
</div>
</div>