Contributing to Blit-Tech #
Thank you for your interest in contributing to the Blit-Tech project.
Developer Certificate of Origin (DCO) #
This project uses the Developer Certificate of Origin (DCO) to ensure that contributors have the legal right to submit their contributions. By contributing to this project, you certify that:
- The contribution was created in whole or in part by you and you have the right to submit it under the project's license.
- The contribution is based upon previous work that is covered under an appropriate license and you have the right to submit that work with modifications.
- The contribution was provided directly to you by some other person who certified (1) or (2) and you have not modified it.
How to Sign Off Your Commits #
All commits must include a Signed-off-by line at the end of the commit message. This line certifies that you agree to
the DCO.
Using the -s flag #
The easiest way to sign off your commits is to use the -s or --signoff flag:
git commit -s -m "feat(renderer): add circle primitive drawing"
This will automatically add the following line to your commit message:
Signed-off-by: Your Name <your.email@example.com>
Amending an Existing Commit #
If you forgot to sign off a commit, you can amend it:
git commit --amend --signoff
Then force push (with lease for safety):
git push --force-with-lease
Signing Off Multiple Commits #
To sign off all commits in a branch:
git rebase --signoff origin/main
git push --force-with-lease
Automated DCO Check #
All pull requests are automatically checked for DCO compliance via GitHub Actions. If any commit is missing the sign-off, the check will fail and you'll need to add it before the PR can be merged.
Commit Message Format #
This project follows the Conventional Commits specification. All commit messages must be formatted as:
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
Signed-off-by: Your Name <your.email@example.com>
Commit Types #
feat- New featurefix- Bug fixdocs- Documentation onlystyle- Formatting, no code changerefactor- Code change that neither fixes a bug nor adds a featureperf- Performance improvementtest- Adding or updating testsbuild- Build system or dependenciesci- CI configurationchore- Other changes
Suggested Scopes #
renderer- Rendering systemcamera- Camera systemassets- Asset loadingapi- Public API (BT namespace)utils- Utility classesexamples- Example projectsci- CI/CD configurationdocs- Documentation
Example Commits #
feat(renderer): add circle primitive drawing
Signed-off-by: John Doe <john@example.com>
fix(assets): handle missing texture gracefully
The asset loader now provides a fallback when texture loading fails.
Signed-off-by: Jane Smith <jane@example.com>
docs: update API reference section
Signed-off-by: John Doe <john@example.com>
Code Style #
All code must follow the project's style guidelines:
- No emoji anywhere in code, comments, or documentation
- TypeScript strict mode - All code must pass strict TypeScript checks
- Formatting - Code is automatically formatted by Biome and Prettier
- Linting - Code must pass all linting checks
- JSDoc - Required for public APIs
Development environment #
- Node.js >=22.18.0 (
enginesinpackage.json) - pnpm 10.26.2+ (
packageManagerinpackage.json)
Pre-commit Checks #
Before committing, run the preflight checks (requires the Node.js version above):
pnpm preflight
This runs:
- Code formatting checks
- Linting
- TypeScript type checks
- Spell checking
- Unused export and dependency checks (knip)
- Unit tests
Available Commands #
pnpm build # Build for production
pnpm lint # Lint code
pnpm lint:fix # Fix linting issues
pnpm format # Format code
pnpm format:check # Check formatting
pnpm typecheck # Run TypeScript checks
pnpm spellcheck # Check spelling
pnpm knip # Find unused exports and dependencies
pnpm preflight # Run all quality checks
Pull Request Process #
- Fork the repository
- Create a feature branch from
main - Make your changes
- Ensure all commits are signed off (DCO)
- Follow the commit message format
- Run
pnpm preflightto ensure code quality - Push to your fork
- Open a pull request against
main
All pull requests will be reviewed by maintainers. The DCO check and other CI checks must pass before a PR can be merged.
AI-Assisted Contributions #
If you use AI tools (like GitHub Copilot, ChatGPT, or Claude) to help write code, please include the AI trailer in your commit message:
feat(renderer): add sprite batching optimization
Signed-off-by: Your Name <your.email@example.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Or for GitHub Copilot:
Co-Authored-By: GitHub Copilot <noreply@github.com>
License #
By contributing to this project, you agree that your contributions will be licensed under the same license as the project.
Questions? #
If you have questions about the DCO or contributing process, please open an issue on GitHub.
Full Developer Certificate of Origin Text #
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.