Here is a quick guide to doing code contributions to the library.
- Fork and clone the repo to your local machine
git clone https://github.com/AmmarHalees/onsubmit.git
- Create a new branch from
main
with a meaningful name for a new feature or an issue you want to work on:git checkout -b your-meaningful-branch-name
-
Use the recommended node version:
nvm use
-
Install packages by running:
pnpm install
-
Run the tests to ensure everything is working correctly as you're making changes.
pnpm run dev
-
Try to write some unit tests to cover as much of your code as possible.
-
Ensure your code lints without errors.
pnpm lint
-
Ensure the build and tests pass before commiting your changes
pnpm run ci
-
Ensure exports are documented.
-
Push your branch:
git push -u origin your-meaningful-branch-name
-
Submit a pull request to the upstream onsubmit repository.
-
Choose a descriptive title and describe your changes briefly.
In case you want to change the README.md
, please instead modify the docs/Template.md
file, as the README is generated from it upon committing.
By contributing your code to the onsubmit GitHub repository, you agree to license your contribution under the MIT license.