|
| 1 | +# Contributing |
| 2 | + |
| 3 | +If you want to contribute to hypixel-api-typed, feel free to fork the repository and submit pull request. |
| 4 | + |
| 5 | +## Table of contents |
| 6 | + |
| 7 | +- [Requirements](#requirements) |
| 8 | +- [Project Setup](#project-setup) |
| 9 | +- [Testing your changes](#testing-your-changes) |
| 10 | +- [Submitting a pull request](#submitting-a-pull-request) |
| 11 | +- [Common issues](#common-issues) |
| 12 | + |
| 13 | +### Requirements |
| 14 | + |
| 15 | +- [Node v20.16.0 or higher](https://nodejs.org/en/learn/getting-started/how-to-install-nodejs) |
| 16 | +- [pnpm v9.7.1 or higher](https://pnpm.io/installation) |
| 17 | + |
| 18 | +### Project Setup |
| 19 | + |
| 20 | +Once you have the requirements installed, you can clone the repository and install the dependencies. |
| 21 | + |
| 22 | +```bash |
| 23 | +pnpm install |
| 24 | +``` |
| 25 | + |
| 26 | +**If your using vscode** With vscode we have a few recommended extensions that you can install to help with development. |
| 27 | +You will be promoted to install these when you open the project in vscode. If you don't see the prompt, you can install |
| 28 | +the extensions manually. Here are the recommended extensions: |
| 29 | + |
| 30 | +- [Editor Config](https://marketplace.visualstudio.com/items?itemName=editorconfig.editorconfig) |
| 31 | +- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) |
| 32 | +- [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) |
| 33 | +- [Gitlens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens) |
| 34 | +- [Better Comments](https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments) |
| 35 | +- [Vitest](https://marketplace.visualstudio.com/items?itemName=vitest.explorer) |
| 36 | +- [GitHub Pull Requests](https://marketplace.visualstudio.com/items?itemName=github.vscode-pull-request-github) |
| 37 | + |
| 38 | +### Testing your changes |
| 39 | + |
| 40 | +Before submitting a pull request, make sure to test your changes. You can run the tests with the following command: |
| 41 | + |
| 42 | +```bash |
| 43 | +pnpm test |
| 44 | +``` |
| 45 | + |
| 46 | +### Submitting a pull request |
| 47 | + |
| 48 | +When submitting a pull request, make sure to provide a detailed description of the changes you made. If you are adding a |
| 49 | +new feature, make sure to include tests for it. If you are fixing a bug, make sure to include the bug report |
| 50 | +information. When making a pull request we have a few requirements: |
| 51 | + |
| 52 | +- Code must be linted (`pnpm lint`) |
| 53 | +- Code must be formatted (`pnpm prettier`) |
| 54 | +- A clear and detailed description of the changes that you have done |
| 55 | +- Checkboxes for the changes you made |
| 56 | +- Screenshots of the code running (if applicable) |
| 57 | + |
| 58 | +### Common issues |
| 59 | + |
| 60 | +There are a few common issues that can come up when contributing to the project. Here are a few of them: |
| 61 | + |
| 62 | +- **Code formatting**: Code must be formatted and the github actions will check for this. If the code is not formatted, |
| 63 | + the github action will fail and you will need to correct this before the pull request can be merged. |
| 64 | + |
| 65 | +- **Code using npm**: Any code that includes an npm lock file will not be accepted. This is because we use pnpm for |
| 66 | + package management. If you have an npm lock file, you will need to remove it and use pnpm to install the packages. |
0 commit comments