fix: 修复设置拖拽动画、代码质量与 TypeScript 严格模式问题#14
Merged
Conversation
1. 为所有 Reorder.Item 添加 layout/transition/whileDrag 属性, 使拖拽时有缩放+阴影反馈,其他项换位有平滑弹簧动画 2. 新增 onFeedsReordered 回调,关闭设置弹窗时自动 flush 防抖中的 排序请求并触发 initFeeds 刷新侧栏文件夹顺序
- ArticleCard: 移除对 thumbnail.original 的访问(thumbnail 类型为 string) - geminiService: 为所有 response.json() 添加类型断言 - rssService: 同上,为 API 响应添加类型断言 - readabilityService: 用 insertBefore 替换 prepend 避免 CF Workers 类型冲突
移除 SelectTrigger 内的 SelectValue,避免选中分类后文字同时 出现在输入框和下拉按钮上导致截断显示不全。
- 新增 .github/workflows/ci.yml,在 PR 和 push to main 时运行 ESLint、tsc 类型检查和构建验证 - 新增 eslint.config.js(flat config),配置 TypeScript、React Hooks、React Refresh 规则 - package.json 添加 lint、lint:fix、typecheck 脚本及 ESLint 相关依赖 - deploy-cloudflare.yml 添加 npm 缓存加速构建
- 删除未使用的导入和变量(Dialog、AISettings、Language、Filter、FolderOpen 等) - 将 catch 块中的 `any` 类型替换为 `unknown` 并添加 instanceof 类型收窄 - 为 Drizzle ORM 操作添加正确的类型断言替代 `as any` - 为 API 响应 JSON 添加具体的类型定义 - 补全 React Hooks 缺失的依赖项 - 移除未使用的 loadEnv 和死代码(showHelp/helpContent state、FEED_CACHE_TTL)
package-lock.json 在 Windows 上生成,不包含 Linux 平台的 @rollup/rollup-linux-x64-gnu optional dependency,导致 npm ci 严格安装后 vite build 找不到该模块。 与 deploy-cloudflare.yml 保持一致,使用 rm package-lock.json && npm install 让 npm 在 Linux CI 环境下重新解析 optional deps。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Bug Fixes
Reorder.Item添加layout/transition/whileDrag属性,使拖拽有缩放+阴影反馈,换位有平滑弹簧动画;新增onFeedsReordered回调确保关闭设置弹窗时 flush 排序请求并刷新侧栏any为unknown,补全 React Hooks 依赖项CI/CD
.github/workflows/ci.yml:PR 和 push to main 时运行 ESLint、tsc 类型检查和构建验证eslint.config.js(flat config)及相关依赖Docs
Test plan
npm run build零错误零警告