Thank you for your interest in contributing to this project! This guide will help you get started.
- Code of Conduct
- Getting Started
- Development Setup
- Making Changes
- Commit Guidelines
- Pull Request Process
- Coding Standards
- Testing
- Documentation
Please be respectful and constructive in all interactions. We welcome contributors of all backgrounds and experience levels.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR-USERNAME/obsidian-substack.git cd obsidian-substack - Add the upstream remote:
git remote add upstream https://github.com/roomi-fields/obsidian-substack.git
- Node.js >= 18.0.0
- npm, yarn, or pnpm
- Git
# Install dependencies
npm install
# Build the project
npm run build
# Run tests to verify setup
npm test| Command | Description |
|---|---|
npm run dev |
Start development mode with watch |
npm run build |
Build for production |
npm test |
Run test suite |
npm run lint |
Check code style |
npm run lint:fix |
Fix code style issues |
npm run format |
Format code with Prettier |
# Update main branch
git checkout main
git pull upstream main
# Create a new branch
git checkout -b feature/your-feature-namefeature/- New featuresfix/- Bug fixesdocs/- Documentation changesrefactor/- Code refactoringtest/- Test additions or modifications
We follow Conventional Commits specification.
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
| Type | Description |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation |
style |
Code style (formatting, semicolons, etc.) |
refactor |
Code refactoring |
perf |
Performance improvement |
test |
Adding or modifying tests |
chore |
Maintenance tasks |
# Feature
git commit -m "feat(auth): add OAuth2 support"
# Bug fix
git commit -m "fix(api): handle null response correctly"
# Documentation
git commit -m "docs: update installation instructions"
# Breaking change
git commit -m "feat!: change API response format
BREAKING CHANGE: response.data is now response.result"-
Update your branch with the latest main:
git fetch upstream git rebase upstream/main
-
Push your changes:
git push origin feature/your-feature-name
-
Open a Pull Request on GitHub
-
Fill out the PR template with:
- Summary of changes
- Related issues
- Testing performed
- Screenshots (if applicable)
-
Wait for review and address any feedback
- Code follows project style guidelines
- Tests pass locally
- Documentation updated if needed
- Commit messages follow conventions
- No unnecessary files included
- Use strict TypeScript settings
- Prefer
constoverlet - Use explicit return types for public functions
- Avoid
anytype when possible
- Use Prettier for code formatting
- 2 spaces for indentation
- Single quotes for strings
- Trailing commas in multi-line structures
| Type | Convention | Example |
|---|---|---|
| Files | kebab-case | user-service.ts |
| Classes | PascalCase | UserService |
| Functions | camelCase | getUserById |
| Constants | UPPER_SNAKE | MAX_RETRIES |
| Interfaces | PascalCase | UserConfig |
| Types | PascalCase | UserId |
# Run all tests
npm test
# Run with coverage
npm run test:coverage
# Run specific test file
npm test -- path/to/test.spec.ts- Place tests next to source files (
*.spec.ts) or intests/directory - Use descriptive test names
- Follow Arrange-Act-Assert pattern
- Mock external dependencies
- Aim for >80% code coverage
- Focus on testing business logic
- Don't test framework code
- Write self-documenting code
- Add comments for complex logic
- Use JSDoc for public APIs
- Update README for new features
- Include usage examples
- Document configuration options
- Document changes in CHANGELOG.md
- Follow Keep a Changelog format
- Link to relevant issues/PRs
- Open an Issue for bugs
- Start a Discussion for questions
Thank you for contributing!