First of all, thanks for taking the time to contribute 🙌
The following is a set of guidelines for contributing to this library, these are mostly guidelines, not rules.
Use your best judgment, and feel free to propose changes to this document in a pull request.
Working on your first Pull Request? You can learn how from this How to Contribute to an Open Source Project on GitHub guide.
- Fork and clone the repo
- Run
npm install
to install dependencies - Create a branch for your PR with
git checkout -b pr/your-branch-name
Tip: Keep your
master
branch pointing at the original repository and make pull requests from branches on your fork. To do this, run:git remote add upstream https://github.com/olafsulich/use-haki.git git fetch upstream git branch --set-upstream-to=upstream/master masterThis will add the original repository as a "remote" called "upstream," Then fetch the git information from that remote, then set your local
master
branch to use the upstream master branch whenever you rungit pull
. Then you can make all of your pull request branches based on thismaster
branch. Whenever you want to update your version ofmaster
, do a regulargit pull
.
Have an awesome idea for next hook? Share it to the world!
- Create
src/useYourHookName.ts
and runnpm start
to start the storybook development server and start coding your hook - Create
src/__tests__/useYourHookName.test.ts
, runnpm test:watch
to start the test runner in watch mode and start writing tests for your hook - Create
docs/useYourHookName.md
and create documentation for your hook, HOOK_TEMPLATE here 👈 - Export your hook from
src/index.ts
and add your hook toREADME.md
You can also write your tests first if you prefer test-driven development.
Do you have an idea how to improve one of existing hooks?
- Run
npm start
and start applying changes - Update tests according to your changes using
npm test:watch
- Update documentation according to your changes
If you find a bug, please file an issue for bugs, it can be missing documentation, or unexpected behavior.
Please file an issue to suggest new features. Vote on feature requests by adding a 👍. This helps me prioritize what to work on.
For questions related to using the library, you can raise issue here, or send me an email: [email protected]
-
Use the present tense ("Add feature" not "Added feature")
-
Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
-
Limit the first line to 72 characters or less
-
Reference issues and pull requests liberally after the first line
-
When only changing documentation, include
[ci skip]
in the commit title -
Consider starting the commit message with an applicable emoji:
- 🎨
:art:
when improving the format/structure of the code - ⚡
:zap:
when improving performance - 🔥
:fire:
when removing code or files. - 🐛
:bug:
when fixing a bug. - 🚑
:ambulance:
when doing critical hotfix. - ✨
:sparkles:
when introducing new features. - 📝
:memo:
when writing docs. - 🚀
:rocket:
when deploying stuff. - 🏷️
:label:
when adding or updating types (TypeScript) - 💄
:lipstick:
when adding or updating the UI and style files. - 🎉
:tada:
when beginning a project/first commit. - 🚱
:non-potable_water:
when plugging memory leaks. - 🐧
:penguin:
when fixing something on Linux. - 🍎
:apple:
when fixing something on macOS. - 🏁
:checkered_flag:
when fixing something on Windows. - 💚
:green_heart:
when fixing the CI build. - ✅
:white_check_mark:
when adding tests. - 🔒
:lock:
when dealing with security. - ⬆️
:arrow_up:
when upgrading dependencies. - ⬇️
:arrow_down:
when downgrading dependencies. - 👕
:shirt:
when removing linter warnings. - ♻️
:recycle:
when refactoring code. - 📦
:package:
when adding or updating compiled files or packages. - 👽
:alien:
when updating code due to external API changes. - 🥚
:egg:
when adding or updating an easter egg.
For more emojis check gitmoji, feel free to use gitmoji cli!
- 🎨
There are git hooks set up with this project that are automatically enabled when you install dependencies. These hooks automatically test and validate your code when creating commits. They're really handy but can be temporarily disabled by adding a --no-verify flag to your commit command. This is useful when you want to commit and push to get feedback on uncompleted code.
Please have a look at the open issues and respond to questions, bug reports and feature requests. Thanks!
For other questions contact me on - [email protected] 📫