Skip to content

Commit 36a1dba

Browse files
committed
init
Signed-off-by: Jacob <[email protected]>
0 parents  commit 36a1dba

28 files changed

+11219
-0
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
max_line_length = 120
11+
12+
[*.{md,markdown}]
13+
trim_trailing_whitespace = false

.github/CONTRIBUTING.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Bug report
3+
about: Report a bug
4+
---
5+
6+
### Bug report
7+
8+
- Part of code where error occurred:
9+
- What error occurred:
10+
11+
### Expected behavior
12+
13+
- What you expected to happen:
14+
15+
### Additional context
16+
17+
- Node version:
18+
- Package version:

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Changes
2+
3+
<!-- A clear and detailed description of the changes that you have done -->
4+
5+
<details>
6+
<summary>Screenshots</summary>
7+
<!--
8+
Screenshots of the code running (if applicable)
9+
Including these screenshots will assist the reviewing and speeding up the process
10+
-->
11+
12+
</details>
13+
14+
<details>
15+
<summary>Checkboxes</summary>
16+
17+
- [ ] I've added new features. (methods or parameters)
18+
- [ ] I've fixed bug. (_optional_ you can mention a issue if there is one)
19+
- [ ] I've corrected the spelling in README, documentation, etc.
20+
- [ ] I've tested my code. (`pnpm test`)
21+
- [ ] I've check for issues. (`pnpm lint`)
22+
- [ ] I've fixed my formatting. (`pnpm prettier`)
23+
24+
</details>

.github/SECURITY.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
| Version | Supported |
6+
| ------- | ------------------ |
7+
| 8.2.x | :white_check_mark: |
8+
| 9.x.x | :white_check_mark: |
9+
| 10.x.x | :white_check_mark: |
10+
| 11.x.x | :white_check_mark: |
11+
12+
## Reporting a Vulnerability
13+
14+
If a vulnerability is found within this project, as long as you follow the steps for responsible disclosure, there will
15+
be no issue and the team will be greatful for your actions.
16+
17+
To report a vulnerability you can do so in the [Discord Server](https://discord.gg/NSEBNMM) by openeing a support ticket
18+
or you can contact the primary contributor of this repository using the following contact methods:
19+
20+
- @.kathund on Discord
21+
- @kathundd on Telegram

.github/labels.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
XS:
2+
name: size/XS
3+
lines: 0
4+
color: 3CBF00
5+
S:
6+
name: size/S
7+
lines: 50
8+
color: 5D9801
9+
M:
10+
name: size/M
11+
lines: 200
12+
color: 7F7203
13+
L:
14+
name: size/L
15+
lines: 1000
16+
color: A14C05
17+
XL:
18+
name: size/XL
19+
lines: 3000
20+
color: C32607
21+
XXL:
22+
name: size/XXL
23+
lines: 7500
24+
color: E50009

.github/renovate.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": ["config:recommended", "group:allNonMajor"],
4+
"rebaseWhen": "behind-base-branch",
5+
"ignoreDeps": ["pnpm", "node", "@types/node"],
6+
"semanticCommits": "enabled",
7+
"labels": ["dependencies"],
8+
"schedule": ["* 0 * * *"],
9+
"enabledManagers": ["npm"],
10+
"rangeStrategy": "bump",
11+
"prConcurrentLimit": 5,
12+
"forkProcessing": "enabled",
13+
"prHourlyLimit": 0,
14+
"timezone": "UTC",
15+
"packageRules": [
16+
{ "matchUpdateTypes": ["minor", "patch"], "matchCurrentVersion": "!/^0/", "commitMessagePrefix": "chore(deps):" }
17+
]
18+
}

.github/workflows/ci-cd.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: 'CI/CD'
2+
on:
3+
push:
4+
paths:
5+
- src/**
6+
branches:
7+
- master
8+
workflow_dispatch:
9+
pull_request:
10+
11+
env:
12+
NODE_VERSION: '20'
13+
14+
jobs:
15+
pnpm:
16+
name: install dependencies (pnpm)
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Git checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Setup pnpm
23+
uses: pnpm/action-setup@v2
24+
25+
- name: Use Node.js ${{ env.NODE_VERSION }}
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: ${{ env.NODE_VERSION }}
29+
cache: 'pnpm'
30+
31+
- name: Install node dependencies
32+
run: pnpm i
33+
34+
prettier:
35+
name: check linting (prettier)
36+
needs: [pnpm]
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Git checkout
40+
uses: actions/checkout@v4
41+
42+
- name: Setup pnpm
43+
uses: pnpm/action-setup@v2
44+
45+
- name: Use Node.js ${{ env.NODE_VERSION }}
46+
uses: actions/setup-node@v4
47+
with:
48+
node-version: ${{ env.NODE_VERSION }}
49+
cache: 'pnpm'
50+
51+
- name: Install node dependencies
52+
run: pnpm i
53+
54+
- name: Check prettier
55+
run: pnpm prettier:check
56+
57+
eslint:
58+
name: check linting (eslint)
59+
needs: [pnpm]
60+
runs-on: ubuntu-latest
61+
steps:
62+
- name: Git checkout
63+
uses: actions/checkout@v4
64+
65+
- name: Setup pnpm
66+
uses: pnpm/action-setup@v2
67+
68+
- name: Use Node.js ${{ env.NODE_VERSION }}
69+
uses: actions/setup-node@v4
70+
with:
71+
node-version: ${{ env.NODE_VERSION }}
72+
cache: 'pnpm'
73+
74+
- name: Install node dependencies
75+
run: pnpm i
76+
77+
- name: Check eslint
78+
run: pnpm lint:check
79+
80+
build:
81+
name: build
82+
needs: [pnpm, eslint]
83+
runs-on: ubuntu-latest
84+
steps:
85+
- name: Git checkout
86+
uses: actions/checkout@v4
87+
88+
- name: Setup pnpm
89+
uses: pnpm/action-setup@v2
90+
91+
- name: Use Node.js ${{ env.NODE_VERSION }}
92+
uses: actions/setup-node@v4
93+
with:
94+
node-version: ${{ env.NODE_VERSION }}
95+
cache: 'pnpm'
96+
97+
- name: Install node dependencies
98+
run: pnpm i
99+
100+
- name: Check build
101+
run: pnpm build

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

.npmignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules/
2+
.github/
3+
.git/
4+
.vscode/
5+
.gitignore
6+
src

0 commit comments

Comments
 (0)