Thank you for considering contributing to typescript-template! This document provides guidelines and instructions for contributing.
- Bun 1.3.1 or higher
- Git
- Docker (for devcontainer)
-
Fork and clone the repository
git fork typescript-template cd typescript-template -
Install dependencies
bun install
-
Optional: Use devcontainer
Open the project in VS Code and click "Reopen in Container" when prompted.
-
Create a new branch
git checkout -b feature/your-feature-name
# Development mode with watch
bun run dev
# Production build
bun run build
bun start# Run linter
bun run lint
# Auto-fix linting issues
bun run lint:fix
# Check code formatting
bun run format:check
# Auto-format code
bun run format
# Find unused code
bun run knip- Use TypeScript with strict mode enabled
- Prefer
constoverlet, avoidvar - Use meaningful variable and function names
- Add JSDoc comments for public APIs
- Avoid
anytype - useunknownif type is truly unknown
src/
├── index.ts # Entry point
├── lib/ # Reusable utilities
└── types/ # TypeScript type definitions
- Imports are automatically sorted by Biome's organize-imports action
- Order: Node built-ins → External packages → Internal modules
Pre-commit hooks automatically run:
- Biome (lint, format, organize imports)
- Prettier (Markdown & YAML formatting)
- Secret detection
Important: If the hook makes changes, they are not automatically staged. Review the changes, stage them, and commit again.
-
Update documentation - Update README.md if you change functionality
-
Run all checks - Ensure linting, formatting, and build pass
-
Write clear commit messages - Follow Conventional Commits
feat: add new feature fix: resolve bug in X docs: update README refactor: restructure Z -
Create Pull Request
- Use a clear, descriptive title
- Reference any related issues
- Describe what changed and why
- Include screenshots for UI changes
-
Address review feedback - Respond to comments and make requested changes
We follow the Conventional Commits specification:
<type>(<scope>): <subject>
<body>
<footer>
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringchore: Maintenance tasks
Example:
feat(auth): add JWT authentication
Implemented JWT-based authentication with refresh tokens.
Includes middleware for protected routes.
Closes #123
Include:
- Clear description of the issue
- Steps to reproduce
- Expected vs actual behavior
- Environment details (OS, Node/Bun version, etc.)
- Error messages and stack traces
Include:
- Clear description of the feature
- Use case and motivation
- Proposed implementation (optional)
All submissions require review. We aim to:
- Provide feedback within 2-3 business days
- Be constructive and respectful
- Focus on code quality, not personal preferences
- Open an issue for questions
- Tag it with
questionlabel - Email you@example.com for private inquiries
By contributing, you agree that your contributions will be licensed under the MIT license.