# Contributing

We love pull requests from everyone. By contributing to this repository, you
agree to abide by the [Code of Conduct](CODE_OF_CONDUCT.md).

## Get started

- First [fork][fork] the repository and then clone it using:

```bash
git clone git@github.com:your-username/valibot.git
```

- After that create a branch for your changes. For example:
  - `feat-XXX` if you will add functionality.
  - `fix-XXX` if you will fix a bug.
  - `test-XXX` if you wrote a test/s.
  - `doc-XXX` if you added to or edited documentation.
  - `refactor-XXX` if you refactor some part of the code.

You may contribute by:

- Implementing a new validation action.
- Optimizing or improving the existing code.
- Suggest a different solution for a problem.
- Finding and fixing bugs and typos.
- Adding examples to explain the usage.
- Adding and improving test cases.
- Improving our website and documentation.

## Pull requests

Push to your fork and [submit a pull request][pr].

### Best practices

As we strive for excellence in our codebase, here are some guidelines to make your contributions shine:

- Code in TypeScript: Embrace the power of TypeScript for writing your code. It helps in maintaining consistency and leveraging TypeScript's robust features.
- Clarity and cleanliness: Write code that speaks for itself. Aim for simplicity and clarity, making it easy for others to read and understand at a glance.
- Commenting and documentation: Illuminate your code with clear comments. Explain the purpose and functionality of your code. Where applicable, include links to relevant Wiki articles or external sources for further context.
- Illustrative examples: Enhance understanding by providing minimal yet meaningful examples to demonstrate the expected output of your code.
- Include test cases: Show the robustness of your code by accompanying it with well-thought-out test cases. This practice not only validates your code but also assists in maintaining the code quality in the long run.
- Size matters for PRs: Keep your pull requests concise and focused. Smaller PRs are easier to review and merge, speeding up the development process. This approach helps in isolating changes and simplifying troubleshooting.
- Crafting a good commit message: Your commit messages are a roadmap of your changes. Make them informative and useful for everyone.

## Issues

Submit a [new issue][newissue] if there is a feature to be added, or if a bug was found in the existing code. Before submitting a new issue please review the [existing issues][issues] to avoid creating duplicates. Also, consider resolving current issues or contributing to the discussion on an issue.

## Collaborators

You can ask for any help or clarifications from the collaborators.

- [Fabian Hiller](https://github.com/fabian-hiller)
- [Elton Lobo](https://github.com/EltonLobo07)
- [Aris Kemper](https://github.com/ariskemper)

[fork]: https://help.github.com/articles/fork-a-repo/
[pr]: https://github.com/open-circle/valibot/compare
[newissue]: https://github.com/open-circle/valibot/issues/new
[issues]: https://github.com/open-circle/valibot/issues
