Thank you for your interest in contributing to use-quiz! This document provides guidelines and information for contributors.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/yourusername/use-quiz.git cd use-quiz - Install dependencies:
pnpm install
-
Create a feature branch:
git checkout -b feature/your-feature-name
-
Make your changes and ensure they follow the project's coding standards
-
Run the development build:
pnpm dev
-
Run tests:
pnpm test -
Run linting:
pnpm lint
-
Format code:
pnpm format
-
Build the library:
pnpm build
We use Vitest for testing. Please ensure:
- All new features have corresponding tests
- Tests cover both happy path and edge cases
- Test coverage doesn't decrease
- Run
pnpm test:coverageto check coverage
- Use TypeScript for all new code
- Follow the existing code style and patterns
- Use Prettier for formatting (configured in
.prettierrc) - Use ESLint for linting (configured in
.eslintrc.json) - Write meaningful commit messages
- Ensure all tests pass
- Ensure code is properly formatted and linted
- Update documentation if needed
- Add tests for new functionality
- Update the README if you add new features
- Submit a pull request with a clear description
When reporting issues, please include:
- A clear description of the problem
- Steps to reproduce the issue
- Expected behavior
- Actual behavior
- Environment information (Node.js version, browser, etc.)
For feature requests, please:
- Check existing issues first
- Provide a clear description of the feature
- Explain the use case and benefits
- Consider if it fits the library's scope
By contributing to use-quiz, you agree that your contributions will be licensed under the MIT License.