diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9857932a..8ef88d14 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -329,7 +329,9 @@ jobs: - name: Validate run: | - npm install -g @stoplight/spectral-cli + # 修復 ENOTEMPTY npm 錯誤 - 先清理舊目錄 + rm -rf $(npm root -g)/@stoplight/spectral-cli 2>/dev/null || true + npm install -g @stoplight/spectral-cli || npm install -g @stoplight/spectral-cli spectral lint docs/api/api-contract.yaml || true # ==================== Docker Build Verify ==================== diff --git a/apps/web/src/hooks/useReducedMotion.ts b/apps/web/src/hooks/useReducedMotion.ts index 65ce0e5c..81c0a0c1 100644 --- a/apps/web/src/hooks/useReducedMotion.ts +++ b/apps/web/src/hooks/useReducedMotion.ts @@ -84,9 +84,8 @@ export function useReducedMotion(): boolean { } // 舊版瀏覽器 fallback (Safari < 14) - // eslint-disable-next-line @typescript-eslint/no-deprecated + // Note: addListener/removeListener 在新瀏覽器已棄用,但為相容 Safari < 14 保留 mediaQuery.addListener(handleChange) - // eslint-disable-next-line @typescript-eslint/no-deprecated return () => mediaQuery.removeListener(handleChange) }, [])