Thank you for your interest in contributing to <PACKAGE_NAME> 💙
Contributions of all kinds are welcome: bug fixes, improvements, documentation, and discussions.
This package follows these principles:
- Be reusable across multiple React applications
- Expose a clear and stable public API
- Keep components focused and testable
- Avoid unnecessary dependencies or vendor lock-in
- Favor correctness, accessibility, and clarity over shortcuts
Please keep these principles in mind when contributing.
# Clone the repository
git clone https://github.com/CISCODE-MA/<REPO_NAME>.git
cd <REPO_NAME>
# Install dependencies
pnpm install
# Copy environment file
cp .env.example .env# Build the project
pnpm run build
# Start development (watch mode)
pnpm run dev
# Run tests
pnpm run test
# Run tests in watch mode
pnpm run test:watch
# Check code quality
pnpm run verify # Lint + typecheck + tests
# Fix lint issues
pnpm run lint:fix
# Format code
pnpm run format:write- Fork the repository and create your feature branch (
git checkout -b feature/amazing-feature) - Make your changes and ensure they follow the project patterns
- Run
pnpm run verifyto check lint, types, and tests - Commit with meaningful messages (we use conventional commits)
- Push to your fork and open a Pull Request
We use:
- ESLint for linting with flat config format
- Prettier for code formatting
- TypeScript with strict mode enabled
- Vitest for unit tests with React Testing Library
All code is auto-formatted on commit via husky hooks.
- Functional components only - Use React hooks
- Props validation - Use TypeScript for type safety
- Accessibility first - WCAG 2.1 AA compliance
- Testability - Write components that are easy to test
- Documentation - JSDoc comments for public APIs
- Write tests for new components and utilities
- Coverage targets: 80%+ for new code
- Test files:
src/**/*.test.tsorsrc/**/*.test.tsx
pnpm run test:cov # Run with coverage reportWe follow Conventional Commits:
<type>(<scope>): <subject>
<BLANK LINE>
<body>
Types: feat, fix, docs, style, refactor, test, chore
Example:
feat(button): add loading state support
This adds a loading state to the Button component with a spinner.
Closes #123
- Bug reports: Use GitHub Issues with reproduction steps
- Feature requests: Discuss first in Discussions or Issues
- Questions: Ask in GitHub Discussions
By contributing, you agree that your contributions will be licensed under the MIT License.
Questions? Feel free to open an issue or contact the maintainers. Thanks for contributing! 🙏