Thank you for your interest in contributing! This document provides guidelines for contributing to this project.
By participating in this project, you agree to abide by our Code of Conduct.
Before creating bug reports, please check the existing issues. When creating a bug report, include:
- Clear title and description
- Steps to reproduce the problem
- Expected behavior vs actual behavior
- API request samples that demonstrate the issue
- Environment details (Node.js version, Docker version, OS)
Enhancement suggestions are welcome! Please provide:
- Clear description of the enhancement
- Use cases and why it would be useful
- Possible implementation approach (if you have ideas)
- Fork the repository and create your branch from
main - Make your changes following our coding standards
- Test your changes by running
npm test - Commit your changes using Conventional Commits:
feat:for new featuresfix:for bug fixesdocs:for documentation changeschore:for maintenance tasksrefactor:for code refactoring
- Push to your fork and submit a pull request
- Node.js (latest LTS version recommended)
- npm or pnpm
# Clone your fork
git clone https://github.com/YOUR_USERNAME/image-optimize.git
cd image-optimize
# Install dependencies
npm install
# Run tests
npm testThis project uses ESLint and follows NestJS best practices. Key principles:
- Line length: Maximum 120 characters
- Indentation: 4 spaces
- Quotes: Use double quotes
"or template literals` - Semicolons: Always use semicolons
- Braces: Always use braces for control structures
// Good
if (condition) {
doSomething();
}
const message = `Hello ${name}`;
// Bad
if (condition) doSomething();
const message = 'Hello ' + name;Follow Conventional Commits:
feat: add support for new ESLint rule
fix: correct TypeScript configuration issue
docs: update README with new examples
chore: upgrade dependenciesBefore submitting your PR:
# Run linter
npm run lint
# Run tests
npm test
# Run e2e tests
npm run test:e2e
# Check for security vulnerabilities
npm auditAll tests must pass before your PR can be merged.
- Automated checks run on every PR (tests, linting, security)
- Manual review by maintainers
- Feedback may be provided - please address comments
- Approval - once approved, your PR will be merged
Releases are automated:
- Maintainer merges PR to
main - Version is bumped automatically
- Changelog is generated
- Docker image is published
- GitHub release is created
- Open an issue with the
questionlabel - Check existing issues and discussions
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to image-optimize! 🎉