Thank you for your interest in contributing! This document outlines the process for contributing to this project.
- Node.js 18 or higher
- pnpm (recommended) or npm
-
Fork this repository
-
Clone your fork:
git clone https://github.com/YOUR_USERNAME/git-hooks-cli.git cd git-hooks-cli -
Install dependencies:
pnpm install
-
Run tests:
pnpm test -
Build the project:
pnpm build
-
Create a new branch for your feature or bugfix:
git checkout -b feature/my-new-feature
-
Make your changes following the coding standards:
- TypeScript for all source files
- ESLint for code linting
- Prettier for code formatting
-
Add tests for your changes if applicable
-
Run the test suite to ensure everything passes:
pnpm test -
Commit your changes with a clear commit message
-
Push to your fork and submit a pull request
This project uses:
- TypeScript for type safety
- ESLint for linting
- Prettier for formatting
Run formatting and linting:
pnpm format
pnpm lintWrite tests for new functionality using Vitest:
import { describe, it, expect } from 'vitest'
describe('HookRunner', () => {
it('should register a hook', () => {
const runner = createHookRunner()
runner.register({ name: 'test', command: 'echo test' })
expect(runner.get('test')).toBeDefined()
})
})Run tests with coverage:
pnpm test:coverage- Fill in the provided PR template completely
- Ensure all tests pass
- Ensure code is properly formatted
- Link any related issues
- Describe your changes clearly
When reporting issues, please include:
- A clear description of the problem
- Steps to reproduce
- Expected behavior
- Actual behavior
- Node.js version and operating system
- Any relevant error messages or logs
This project follows our Code of Conduct. By participating, you are expected to uphold this code.
Feel free to open an issue for questions about contributing or using the project.