mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-07-06 08:47:28 +08:00
Merge pull request #677 from chengww5217/chore/fix-existing-lint
ci: 修复 PR Code Quality job 失败(存量 lint + typecheck 拿不到 unplugin d.ts)
This commit is contained in:
@@ -58,12 +58,24 @@ jobs:
|
||||
with:
|
||||
node-version: 24
|
||||
|
||||
# lint:i18n 脚本用 bun 跑(package.json: "bun scripts/check_i18n.ts"),
|
||||
# CI 默认环境没有 bun 会报 sh: bun: not found
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Lint
|
||||
run: npx eslint --max-warnings 0 "src/**/*.{ts,tsx,vue,js}"
|
||||
|
||||
# tsconfig.web.json 显式 require src/renderer/{auto-imports,components}.d.ts
|
||||
# 这两个文件由 unplugin-auto-import / unplugin-vue-components 在 vite 启动时
|
||||
# 生成,且被 .gitignore 排除(58922dc 维护者主动设置)。CI 直接跑 typecheck
|
||||
# 拿不到 d.ts 会报 TS2688,先跑一次 build 触发 unplugin 生成
|
||||
- name: Build (generates auto-import / components d.ts)
|
||||
run: npm run build
|
||||
|
||||
- name: Type check
|
||||
run: npm run typecheck
|
||||
|
||||
|
||||
+4
-2
@@ -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"
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user