@@ -335,6 +335,122 @@ We welcome contributions! Please follow our contribution guidelines:
3353358 . ** Push** to your branch: ` git push origin feature/amazing-feature `
3363369 . ** Submit** a Pull Request
337337
338+ ### Pre-Commit Checklist
339+
340+ Before committing and pushing your changes, ensure all the following checks pass:
341+
342+ #### Code Quality Checks
343+
344+ - ✅ ** Code Formatting** : Run ` pnpm lint ` to ensure all files are properly formatted
345+ ``` bash
346+ pnpm lint
347+ # If issues found, auto-fix with:
348+ pnpm lint:fix
349+ ```
350+
351+ - ✅ ** TypeScript Type Checking** : No type errors
352+ ``` bash
353+ pnpm type-check
354+ ```
355+
356+ - ✅ ** Linting** : No linting errors
357+ ``` bash
358+ pnpm lint
359+ ```
360+
361+ #### Testing Requirements
362+
363+ - ✅ ** Unit Tests** : All unit tests pass
364+ ``` bash
365+ pnpm test:run
366+ ```
367+
368+ - ✅ ** Test Coverage** : Maintain or improve test coverage
369+ - Statement coverage: > 95%
370+ - Branch coverage: > 90%
371+ - Function coverage: 100%
372+ - Line coverage: > 95%
373+
374+ - ✅ ** Integration Tests** : Integration tests pass (if applicable)
375+ ``` bash
376+ pnpm test:integration
377+ ```
378+
379+ - ✅ ** Performance Tests** : Performance benchmarks pass (if applicable)
380+ ``` bash
381+ pnpm test:performance
382+ ```
383+
384+ #### Build Verification
385+
386+ - ✅ ** Build Success** : Project builds without errors
387+ ``` bash
388+ pnpm build
389+ ```
390+
391+ #### Security & Dependencies
392+
393+ - ✅ ** Security Audit** : No critical or high severity vulnerabilities
394+ ``` bash
395+ pnpm audit --audit-level=moderate
396+ ```
397+
398+ - ✅ ** Dependencies** : No unnecessary dependencies added
399+ - ✅ ** Lock File** : ` pnpm-lock.yaml ` is up to date
400+
401+ #### Code Review Requirements
402+
403+ - ✅ ** Self-Review** : Review your own code before submitting PR
404+ - ✅ ** Code Comments** : Code is properly commented (English)
405+ - ✅ ** No Debug Code** : Remove all ` console.log ` and debug statements
406+ - ✅ ** TypeScript Types** : All types are properly defined
407+ - ✅ ** Commit Messages** : All commit messages are in English following Conventional Commits
408+
409+ #### Documentation
410+
411+ - ✅ ** Code Comments** : JSDoc comments for public APIs
412+ - ✅ ** README Updates** : Update README if needed
413+ - ✅ ** API Documentation** : Update API docs if needed
414+ - ✅ ** Changelog** : Update changelog for user-facing changes
415+
416+ ### CI/CD Pipeline Checks
417+
418+ All PRs will automatically run the following checks via GitHub Actions:
419+
420+ #### 🔍 Code Quality Pipeline
421+
422+ - ** Code Formatting** : Prettier formatting check
423+ - ** TypeScript** : Type checking with ` vue-tsc `
424+ - ** Dependencies** : Outdated packages and security audit
425+ - ** Code Complexity** : Complexity analysis
426+ - ** Documentation** : JSDoc coverage check
427+ - ** Performance** : Performance benchmarks
428+
429+ ** Quality Score Requirements** :
430+ - 🎉 ** Excellent** (90%+): Code quality is outstanding
431+ - 👍 ** Good** (75%+): Code quality is solid
432+ - ⚠️ ** Fair** (60%+): Consider addressing failing checks
433+ - ❌ ** Needs Improvement** (<60%): Multiple issues need attention
434+
435+ #### 🧪 Test Pipeline
436+
437+ - ** Linting** : ESLint and Prettier checks
438+ - ** Type Checking** : TypeScript type validation
439+ - ** Unit Tests** : Multi-version Node.js testing (20, 22)
440+ - ** Integration Tests** : Full functional integration tests
441+ - ** Performance Tests** : Performance benchmarks and stress tests
442+ - ** Code Coverage** : Coverage report generation and upload
443+ - ** Security Scan** : Dependency audit and CodeQL analysis
444+ - ** Build Test** : Verify project builds successfully
445+
446+ ** Test Coverage Requirements** :
447+ - Statement coverage: > 95%
448+ - Branch coverage: > 90%
449+ - Function coverage: 100%
450+ - Line coverage: > 95%
451+
452+ ** Important** : All CI/CD checks must pass before your PR can be merged. Make sure to run these checks locally before pushing.
453+
338454### Coding Standards
339455
340456- ** TypeScript** : Use TypeScript for all new code with strict mode
@@ -343,6 +459,9 @@ We welcome contributions! Please follow our contribution guidelines:
343459- ** Comments** : All comments and documentation in English
344460- ** Testing** : Include tests for new features
345461- ** Performance** : Consider performance implications
462+ - ** Code Formatting** : All code must be formatted with Prettier (checked in CI)
463+ - ** Type Safety** : No TypeScript errors (checked in CI)
464+ - ** Test Coverage** : Maintain high test coverage (>95% statements, >90% branches, 100% functions)
346465
347466### Code Style
348467
0 commit comments