# Contributing to Chahuadev Comment Fixer **ยินดีต้อนรับสู่ชุมชนนักพัฒนา Chahuadev Comment Fixer!** เราขอขอบคุณที่คุณสนใจจะมาช่วยพัฒนาเครื่องมือนี้ให้ดีขึ้น การมีส่วนร่วมของคุณจะช่วยให้โปรเจกต์นี้เติบโตและเป็นประโยชน์กับชุมชนนักพัฒนาทั่วโลก We welcome contributions from developers of all skill levels! This document will guide you through the process of contributing to our project. ## Table of Contents - สารบัญ - [Code of Conduct](#code-of-conduct) - [Getting Started](#getting-started) - [Development Setup](#development-setup) - [Contributing Guidelines](#contributing-guidelines) - [Pull Request Process](#pull-request-process) - [Coding Standards](#coding-standards) - [Testing Guidelines](#testing-guidelines) - [Documentation](#documentation) - [Community Support](#community-support) ## Code of Conduct This project adheres to the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [contact@chahuadev.com](mailto:contact@chahuadev.com). ## Getting Started - เริ่มต้น ### Prerequisites - ข้อกำหนดเบื้องต้น - **Node.js**: Version 22.0.0 or higher - **npm**: Version 7.0.0 or higher - **Git**: Latest stable version - **Text Editor**: VS Code recommended with extensions: - ESLint - Prettier - GitLens - Thunder Client (for API testing) ### Quick Start ```bash # 1. Fork และ Clone repository git clone https://github.com/YOUR_USERNAME/chahuadev-fix-comments.git cd chahuadev-fix-comments # 2. เพิ่ม upstream remote git remote add upstream https://github.com/chahuadev/chahuadev-fix-comments.git # 3. ติดตั้ง dependencies npm install # 4. รันการทดสอบเพื่อให้แน่ใจว่าทุกอย่างทำงานได้ npm test # 5. เริ่มพัฒนา! git checkout -b feature/your-amazing-feature ``` ## Development Setup - การตั้งค่าการพัฒนา ### Environment Configuration ```bash # Create development environment file cp .env.example .env # Install development dependencies npm install --include=dev # Verify installation npm run test:basic ``` ### Project Structure - โครงสร้างโปรเจกต์ ``` chahuadev-fix-comments/ ├── .github/ │ └── workflows/ # GitHub Actions CI/CD ├── scripts/ # Build และ automation scripts ├── test-chahuadev-comment-fixer/ # Test files ├── fix-comments.js # Main CLI tool ├── test-suite.js # Comprehensive test suite ├── package.json ├── README.md ├── CONTRIBUTING.md ├── CODE_OF_CONDUCT.md └── LICENSE ``` ### Development Commands ```bash # รันเครื่องมือในโหมด development npm run fix ./test-samples # รันการทดสอบแบบ basic npm run test:basic # รันการทดสอบแบบเต็ม npm test # ทดสอบ tokenizer เวอร์ชันใหม่ npm run test:demo # ตรวจสอบโค้ดก่อน publish npm run validate ``` ## Contributing Guidelines - แนวทางการมีส่วนร่วม ### Types of Contributions - ประเภทการมีส่วนร่วม 1. ** Bug Reports** - รายงานปัญหา 2. ** Feature Requests** - ขอฟีเจอร์ใหม่ 3. ** Documentation** - ปรับปรุงเอกสาร 4. ** Tests** - เพิ่มการทดสอบ 5. ** Code Improvements** - ปรับปรุงโค้ด 6. ** Translations** - แปลภาษา 7. ** UI/UX** - ปรับปรุงประสบการณ์ผู้ใช้ ### Before You Start - ก่อนเริ่มงาน 1. **ค้นหา Issues ที่มีอยู่** เพื่อหลีกเลี่ยงการทำงานซ้ำซ้อน 2. **สร้าง Issue ใหม่** หากเป็นการเปลี่ยนแปลงใหญ่ 3. **แจ้งในความคิดเห็น** ว่าคุณกำลังทำงานใน Issue นั้น 4. **อ่าน Code of Conduct** และ Contributing Guidelines ### Issue Guidelines - แนวทางการสร้าง Issue #### Bug Report Template ```markdown ## Bug Description - คำอธิบายปัญหา [อธิบายปัญหาอย่างชัดเจน] ## Steps to Reproduce - ขั้นตอนการทำซ้ำ 1. รันคำสั่ง: `npx @chahuadev/fix-comments ...` 2. ใช้กับไฟล์: `...` 3. เห็นปัญหา: `...` ## Expected Behavior - ผลลัพธ์ที่คาดหวัง [อธิบายสิ่งที่ควรจะเกิดขึ้น] ## Actual Behavior - ผลลัพธ์ที่เกิดขึ้นจริง [อธิบายสิ่งที่เกิดขึ้นจริง] ## Environment - สภาพแวดล้อม - OS: [e.g., Windows 11, macOS 13, Ubuntu 22.04] - Node.js: [e.g., 18.17.0] - Package Version: [e.g., 1.1.0] ## Additional Context - บริบทเพิ่มเติม [ข้อมูลอื่นๆ ที่เกี่ยวข้อง] ``` #### Feature Request Template ```markdown ## Feature Description - คำอธิบายฟีเจอร์ [อธิบายฟีเจอร์ที่ต้องการ] ## Problem Statement - ปัญหาที่ต้องการแก้ไข [อธิบายปัญหาที่ฟีเจอร์นี้จะช่วยแก้ไข] ## Proposed Solution - วิธีการที่เสนอ [อธิบายวิธีการที่คิดว่าจะใช้แก้ปัญหา] ## Alternatives Considered - ทางเลือกอื่นที่พิจารณา [อธิบายทางเลือกอื่นๆ ที่คิดไว้] ## Implementation Ideas - แนวคิดการพัฒนา [แนวคิดเบื้องต้นสำหรับการพัฒนา] ``` ## Pull Request Process - ขั้นตอนการส่ง Pull Request ### 1. Preparation - การเตรียมตัว ```bash # อัพเดต branch ของคุณให้ตรงกับ upstream git checkout main git pull upstream main git checkout your-feature-branch git rebase main ``` ### 2. Code Quality Check - ตรวจสอบคุณภาพโค้ด ```bash # รันการทดสอบทั้งหมด npm test # ตรวจสอบ code style npm run lint # ตรวจสอบ security npm audit # ทดสอบการติดตั้ง npm pack ``` ### 3. Commit Guidelines - แนวทางการ Commit #### Commit Message Format ``` ():