Contributing
Thank you for your interest in contributing to md2cf!
Prerequisites
- Node.js >= 24.0.0
- npm >= 11.0.0
- Git
Development setup
- Fork the repository on GitHub.
- Clone your fork:bash
git clone https://github.com/YOUR_USERNAME/markdown-to-confluence-sync.git cd markdown-to-confluence-sync - Install dependencies:bash
npm install - Create a branch:bash
git checkout -b feature/your-feature-name
Available scripts
| Command | Description |
|---|---|
npm run dev | Watch mode for development |
npm run build | Build the project |
npm test | Run tests |
npm run test:watch | Tests in watch mode |
npm run test:coverage | Tests with coverage report |
npm run lint | Lint the code |
npm run lint:fix | Lint and auto-fix |
npm run format | Format code with Prettier |
npm run format:check | Check code formatting |
npm run typecheck | TypeScript type checking |
Submitting pull requests
- Ensure code follows the existing style (ESLint + Prettier).
- Write or update tests for your changes.
- All tests pass:
npm test - Coverage thresholds are met:
npm run test:coverage(90%+) - Linting passes:
npm run lint - Types check:
npm run typecheck - Write a clear commit message following Conventional Commits.
Commit message format
<type>(<scope>): <description>Types: feat, fix, docs, style, refactor, test, chore, perf, ci
Examples:
feat(sync): add support for batch syncing multiple files
fix(converter): handle nested lists correctly
docs: update installation instructionsCode style
- TypeScript with strict mode
- ESM modules (
"type": "module") - Double quotes, semicolons required
- 100 character line width, trailing commas
- Run
npm run formatbefore committing
Testing guidelines
- Write tests for all new functionality
- Maintain 90%+ coverage (branches, functions, lines, statements)
- Use Vitest with mocked external dependencies
- Place tests in
tests/unit/with.test.tsextension
Project structure
src/
cli/ # CLI entry point and commands
commands/ # Individual command implementations
lib/ # Core library modules
tests/
unit/ # Unit tests (mirrors src/ structure)
skills/
md2cf/ # Agent skill definitionRelease process
Releases are managed via GitHub Actions:
- Go to Actions > Release workflow.
- Click Run workflow and select version type (major / minor / patch).
- The workflow runs CI checks, bumps the version, publishes to npm, and creates a GitHub Release.
Questions?
Open an issue or start a discussion on GitHub.