Contributing
Thanks for your interest in contributing to N2O!
Code of Conduct
Section titled “Code of Conduct”Be respectful, constructive, and inclusive.
Getting Started
Section titled “Getting Started”- Fork the repository.
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/n2o.git - Install dependencies:
npm install - Create a branch:
git checkout -b feature/your-feature - Make your changes.
- Run tests:
npm test - Run lint:
npm run lint - Commit with conventional format.
- Push and open a Pull Request.
Development Setup
Section titled “Development Setup”npm install # Install dependenciesnpm run dev # Start watch mode (hot reload)npm test # Run testsnpm run lint:fix # Fix lint issuesWhat to Contribute
Section titled “What to Contribute”Good first issues
Section titled “Good first issues”- Bug fixes with clear reproduction steps
- Test coverage for existing utilities
- Documentation improvements
- Typo fixes
Larger contributions
Section titled “Larger contributions”For significant changes (new features, architecture changes), please open an issue first to discuss the approach.
Areas we’d love help with
Section titled “Areas we’d love help with”- Cross-platform testing (especially macOS and Linux)
- Performance optimization for large vaults (1000+ pages)
- Additional Notion block type support
- Translations / localization
Code Style
Section titled “Code Style”- TypeScript strict mode — no
anyin core code. - ESLint + Prettier — run
npm run lint:fixandnpm run format. - JSDoc on all public APIs.
- Keep it simple — don’t over-engineer.
Commit Messages
Section titled “Commit Messages”Use conventional commits:
type(scope): descriptionTypes: feat, fix, docs, refactor, test, chore, perf
Scopes: core, notion, obsidian, ui, storage, utils, docs
Examples:
feat(core): add attachment deduplicationfix(notion): handle rate limit 429 responses gracefullydocs: update troubleshooting guideArchitecture
Section titled “Architecture”N2O uses an intermediate document format that decouples the Notion and Obsidian adapters:
Notion API → NotionParser → N2ODocument → ObsidianBuilder → MarkdownMarkdown → ObsidianParser → N2ODocument → NotionPusher → Notion APIKey rules:
- Notion and Obsidian adapters are fully independent — they only share models.
- Use
requestUrlfrom Obsidian for HTTP (neverfetchoraxios). - Use
processFrontMatter()for YAML changes.
Pull Request Process
Section titled “Pull Request Process”- Ensure all tests pass (
npm test). - Ensure no lint errors (
npm run lint). - Update documentation if needed.
- Add a clear description of what changed and why.
- Link any related issues.
License
Section titled “License”By contributing, you agree that your contributions will be licensed under the MIT License.