Commit Graph
3 Commits
Author SHA1 Message Date
zhongyidian 76c67b492e feat: 更新 ESLint 和 Prettier 配置,增强代码质量管理
- 在 .gitignore 中添加 public/audio/* 以忽略音频文件。
- 更新 bun.lock,添加 eslint-config-prettier 和 eslint-plugin-prettier 依赖,确保 ESLint 与 Prettier 的兼容性。
- 修改 eslint.config.ts,整合 Prettier 规则,优化代码风格一致性。
- 在 package.json 中添加 lint:fix 和 format 脚本,简化代码格式化和修复流程。
- 更新 tailwind.config.ts 和其他组件文件,统一代码风格,提升可读性。
2026-03-05 13:50:47 +08:00
zhongyidian 2d66abc610 refactor: clean up dependencies and enhance component functionality
- Removed unused dependencies related to @dnd-kit from pnpm-lock.yaml.
- Updated Vite configuration to set the base path.
- Added input styles to the main CSS file.
- Enhanced BackgroundImage component to include an overflowHidden prop for better layout control.
- Deleted the DraggableItem component as it was no longer needed.
- Updated routing to include new Publicity and Content pages, and modified navigation in Menu and NotFound components.
2025-10-22 00:41:38 +08:00
zhongyidianandClaude 543cecf2ee 迁移到 TypeScript
完整的 TypeScript 迁移,提升代码质量和开发体验

**安装依赖:**
- TypeScript 5.9.3
- @types/react, @types/react-dom, @types/node
- typescript-eslint 相关包

**配置文件:**
- 创建 tsconfig.json (应用配置)
- 创建 tsconfig.node.json (Node 配置)
- 更新 eslint.config.ts 支持 TypeScript
- 所有配置文件迁移到 .ts 扩展名

**源代码迁移:**
- 所有 .jsx 文件 → .tsx
- 所有 .js 文件 → .ts
- 添加完整的类型定义和接口
- 修复所有类型错误

**类型定义:**
- Experiment 接口 (实验数据类型)
- DraggableItemProps 接口
- 函数参数类型注解
- React 组件 Props 类型

**代码优化:**
- 修复 main.tsx 中的 null 检查
- 添加 DragEndEvent 类型
- 使用类型守卫和类型断言
- 改进错误处理

**构建脚本:**
- 添加 typecheck 脚本
- build 脚本包含类型检查
- 更新 index.html 入口为 main.tsx

**验证:**
- ✅ TypeScript 编译通过
- ✅ ESLint 检查通过
- ✅ 所有类型正确推导
- ✅ 代码质量提升

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-17 10:30:10 +08:00