fix(ci): 修復 ESLint + spectral-cli 安裝錯誤
- 移除不存在的 @typescript-eslint/no-deprecated 規則 - 修復 npm ENOTEMPTY 錯誤 (先清理舊目錄) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
4
.github/workflows/ci.yaml
vendored
4
.github/workflows/ci.yaml
vendored
@@ -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 ====================
|
||||
|
||||
@@ -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)
|
||||
}, [])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user