Skip to content

Latest commit

 

History

History
106 lines (73 loc) · 3.2 KB

File metadata and controls

106 lines (73 loc) · 3.2 KB

贡献指南 / Contributing Guide

欢迎为 AskOnce 项目贡献力量!/ Welcome to contribute to AskOnce!


目录 / Table of Contents

  1. 如何贡献 / How to Contribute
  2. 开发环境设置 / Development Environment Setup
  3. 项目结构 / Project Structure
  4. 代码规范 / Code Standards
  5. 许可证 / License

如何贡献 / How to Contribute

1. 报告问题 / Report Issues

  • 使用 GitHub Issues 报告 bug 或功能请求 / Use GitHub Issues to report bugs or feature requests
  • 描述问题的详细信息,包括复现步骤 / Describe the issue in detail, including reproduction steps
  • 附上相关截图或日志 / Attach relevant screenshots or logs

2. 提交代码 / Submit Code

  1. Fork 项目 / Fork the project
  2. 创建特性分支 / Create feature branch (git checkout -b feature/amazing-feature)
  3. 提交更改 / Commit changes (git commit -m 'Add amazing feature')
  4. 推送分支 / Push branch (git push origin feature/amazing-feature)
  5. 打开 Pull Request / Open a Pull Request

3. 代码规范 / Code Standards

  • 使用有意义的变量名 / Use meaningful variable names
  • 添加适当的注释 / Add appropriate comments
  • 确保代码通过 ESLint 检查 / Ensure code passes ESLint checks
  • 编写测试用例(如果适用)/ Write test cases (if applicable)

开发环境设置 / Development Environment Setup

# 克隆仓库 / Clone repository
git clone https://github.com/linuxhsj/askonce.git
cd askonce

# 安装依赖 / Install dependencies
npm install

# 启动开发服务器 / Start development server
npm run dev

项目结构 / Project Structure

askonce/
├── backend/          # 后端服务 / Backend services
│   ├── node/         # Node.js Express (核心 / Core)
│   └── python/       # Python FastAPI (参考 / Reference)
├── frontend/         # Web 前端 / Web frontend
├── extension/        # 浏览器扩展 / Browser extension
├── shared/           # 共享代码 / Shared code
└── docs/             # 文档 / Documentation

代码规范 / Code Standards

TypeScript

  • 使用 TypeScript 进行类型安全开发 / Use TypeScript for type-safe development
  • 遵循 ESLint 配置规则 / Follow ESLint configuration rules
  • 为函数添加类型注解 / Add type annotations to functions

提交信息 / Commit Messages

  • 使用清晰、描述性的提交信息 / Use clear, descriptive commit messages
  • 格式 / Format: type: description
    • feat: 新功能 / New feature
    • fix: 修复 bug / Bug fix
    • docs: 文档更新 / Documentation update
    • refactor: 代码重构 / Code refactoring

分支命名 / Branch Naming

  • feature/feature-name - 新功能 / New features
  • fix/bug-name - Bug 修复 / Bug fixes
  • docs/description - 文档更新 / Documentation updates

许可证 / License

MIT License - 详见 / See LICENSE


文档版本 / Document Version: v1.1 更新日期 / Updated: 2026-03-07 作者 / Author: SeekSage