Contributing to Magiclogger
Thank you for your interest in contributing to Magiclogger! This document provides guidelines and instructions for contributing to this project.
Table of Contents
- Code of Conduct
- Getting Started
- Development Workflow
- Commit Guidelines
- Pull Request Process
- Coding Standards
- Testing
Code of Conduct
We expect all contributors to act professionally and respectfully. By participating in this project, you agree to maintain a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
Getting Started
To get started with development:
- Fork the repository on GitHub
- Clone your fork:
git clone https://github.com/your-username/magiclogger.git
cd magiclogger - Install dependencies:
npm install
- Set up your development environment
- See Development Guide for detailed instructions
Development Workflow
-
Create a new branch for your changes:
git checkout -b feature/your-feature-name
-
Make your changes:
- Write code
- Add tests
- Update documentation
-
Run tests and linting:
npm test
npm run lint -
Format your code:
npm run format
-
Check test coverage:
npm run test:coverage
Commit Guidelines
We follow Conventional Commits for commit messages. This enables automatic versioning and changelog generation.
Format your commits as:
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
Types:
feat
: A new feature (triggers minor version bump)fix
: A bug fix (triggers patch version bump)docs
: Documentation changesstyle
: Code style changes (formatting, etc.)refactor
: Code changes that neither fix bugs nor add featuresperf
: Performance improvementstest
: Adding or correcting testschore
: Changes to build process or tools
For breaking changes, add !
after the type or include a BREAKING CHANGE:
footer.
Example:
feat(logger): add color support for backgrounds
Add ability to use background colors in text output.
Closes #42
You can use the provided commit script for guided commit creation:
npm run commit
See Git Workflow for more details.
Pull Request Process
- Ensure your code passes all tests and maintains test coverage
- Update documentation if you're changing behavior
- Submit your pull request targeting the
main
branch - Describe your changes in detail and link any related issues
- Wait for review - maintainers will review your PR as soon as possible
- Address review feedback if requested
Coding Standards
Magiclogger follows these standards:
- TypeScript for type safety
- ESLint for code quality
- Prettier for consistent formatting
- Jest for testing
Our automated tools enforce these standards. Run these locally before submitting:
npm run lint
npm run format
Testing
We maintain high test coverage standards:
- Write tests for all new features
- Ensure all edge cases are covered
- Maintain coverage thresholds (95%+)
Run tests with:
npm test
Check coverage with:
npm run test:coverage
Additional Information
- CI/CD Pipeline: See CI/CD Documentation
- Release Process: See Publishing Guide
- API Documentation: See API Usage
Thank you for contributing to Magiclogger!