When contributing to this repository, please make sure to read through these guidelines. Note that no matter how you contribute, your participation is governed by our Code of Conduct.
- Submit a bug report or feature request
- Make changes to the code or docs
- Develop the docs
- Develop packages
- Submit a Pull Request
- Commit message format
Please use the GitHub issue tracker to submit bug reports and feature requests.
- Make sure you are using the latest version of the library
- Check the open issues to ensure you are reporting a new issue
Your contributions are welcome. Here's our suggested workflow:
- Fork and clone the repository
- Run
pnpm install
to install dependencies - Create a new branch for each feature, fix or improvement
- Send a pull request from each feature branch to the master branch
- We use Husky to auto format and lint code on
pre-commit
hook - We use standardized commit messages following the Conventional commit specification. See Commit message format.
- We use Husky to auto format and lint code on
- Continue reading Develop the docs or Develop packages
It is very important to separate new features or improvements into separate feature branches, and to send a pull request for each branch. This allows us to review and pull in new features or improvements individually.
Make sure you read and follow the instructions in the pull request template. And note that all participation in this project (including code submissions) is governed by our Code of Conduct.
Follow the setup instructions at Make changes to the code or docs.
At the workspace root
run the following command:
pnpm run dev:react
Continue reading Submit a Pull Request.
If you're making changes to one of the packages that requires a build step (e.g., core
or react
), you can setup a watcher in a separate terminal to automatically run the build step whenever files are changed.
# start the watcher for `core`, `react` & `react-hooks` package
pnpm run dev:react
Once you're done making the changes, you can now open a pull request (PR). Go to the forked repository in GitHub and select your feature branch. Click the 'Pull Request' button and fill out the form.
While naming your Pull Request, make sure to read the following commit message guidelines.
After staging your changes in git, run the following command at the workspace root
to start mini-cz
:
~~git commit~~
pnpm commit
Do not use
git commit -m <message> / --message=<msg>
flag, instead use the mini-cz.
We use mini-cz to generate standardized commit messages following the Conventional Commits specification.
<type>(<scope>): <short summary>
│ │ │
│ │ └─⫸ Summary in present tense. Not capitalized. No period at the end.
│ │
│ └─⫸ Commit Scope: workspace|core|react|react-hooks
│
└─⫸ Commit Type: feat|fix|docs|style|refactor|test|chore|perf|build|ci|revert
The <type>
and <summary>
fields are mandatory, the (<scope>)
field is optional but should be used.
Click here to see a more detailed description on the commit message format.
Must be one of the following:
- feat: A new feature
- fix: A bug fix
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code
- refactor: A code change that neither fixes a bug nor adds a feature
- test: Adding missing tests or correcting existing tests
- chore: Other changes that don't modify src or test files
- perf: A code change that improves performance
- build: Changes that affect the build system or external dependencies
- ci: Changes to our CI configuration files and scripts
- revert: Reverts a previous commit
The scope should be the name of the npm package affected (as perceived by the person reading the changelog generated from commit messages).
The following is the list of supported scopes:
workspace
core
react
react-hooks
Use the summary field to provide a succinct description of the change:
- use the imperative, present tense:
change
notchanged
norchanges
- don't capitalize first letter
- no dot (.) at the end
Just as in the summary, use the imperative, present tense: “change” not “changed” nor “changes”. The body should include the motivation for the change and contrast this with previous behavior.
The footer should contain any information about Breaking Changes and is also the place to reference GitHub issues that this commit Closes.
Breaking Changes should start with the word BREAKING CHANGE:
with a space or two newlines. The rest of the commit message is then used for this.
A detailed explanation of Conventional Commits messages can be found at Conventional Commits examples.