Thank you for considering contributing to OpenZeppelin UI! This document outlines the process for contributing to the project.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Run tests:
pnpm test - Commit your changes following our commit convention
- Push to your branch:
git push origin feature/amazing-feature - Open a Pull Request
- Ensure your code follows the style guidelines of the project
- Update the README.md with details of changes if applicable
- The PR should work for Node.js version 20.19.0 or higher
- Include tests for new features or bug fixes
- Link any relevant issues in the PR description
# Clone your fork
git clone https://github.com/your-username/openzeppelin-ui.git
# Navigate to the project directory
cd openzeppelin-ui
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Run tests
pnpm testpnpm build- Build all packagespnpm test- Run testspnpm lint- Run ESLintpnpm lint:fix- Fix ESLint issuespnpm format- Format code with Prettierpnpm typecheck- Run TypeScript type checking
- Follow the existing code style
- Write tests for your changes
- Keep pull requests focused on a single topic
- Add proper documentation for new features
- Use the shared Prettier configuration at the root of the repository
- Don't add package-specific
.prettierrcfiles - Run
pnpm formatto format all code before committing
- Don't add package-specific
All library packages in this monorepo use tsdown for building. Key points to remember:
- tsdown Configuration: Each package has its own
tsdown.config.tsfile. - Dual Format: All packages output both ES modules and CommonJS formats.
- TypeScript Declarations: Type declarations are generated automatically.
- Building Packages: Run
pnpm buildat the root to build all packages.
When creating new packages:
- Create a
tsdown.config.tsfile for the package. - Ensure your
package.jsonhas properexportsconfiguration for both ESM and CJS. - Set
"type": "module"in yourpackage.json.
We follow Conventional Commits.
Commit message format:
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
Scopes: types, utils, styles, components, renderer, react, storage, deps, config, ci, docs, tests, release, examples, common
By contributing, you agree that your contributions will be licensed under the project's AGPL-3.0 license.