Skip to content

Commit

Permalink
Added Prettier and made changes using it
Browse files Browse the repository at this point in the history
  • Loading branch information
Kathund committed Sep 4, 2023
1 parent 27f1a75 commit 7565441
Show file tree
Hide file tree
Showing 114 changed files with 6,515 additions and 5,366 deletions.
97 changes: 40 additions & 57 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,57 +1,40 @@
{
"env": {
"commonjs": true,
"es2021": true,
"node": true
},
"extends": [
"google",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2021
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"linebreak-style": "off",
"comma-dangle": [
"error",
"never"
],
"valid-jsdoc": [
"error",
{
"requireParamDescription": false,
"requireReturnDescription": false,
"requireReturn": true
}
],
"max-len": [
"error",
{
"code": 210,
"ignoreUrls": true
}
],
"indent": [
"error",
2,
{
"SwitchCase": 1
}
],
"quote-props": ["error", "as-needed"],
"object-curly-spacing": "off",
"space-before-function-paren": "off",
"semi": "error",
"no-console": "error",
"@typescript-eslint/no-var-requires": "off",
"no-extra-semi": "error",
"@typescript-eslint/no-unused-vars": [
"off"
]
}
}
{
"env": {
"commonjs": true,
"es2021": true,
"node": true
},
"extends": ["google", "plugin:@typescript-eslint/recommended", "prettier"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2021
},
"plugins": ["@typescript-eslint"],
"rules": {
"linebreak-style": "off",
"comma-dangle": ["error", "never"],
"valid-jsdoc": [
"error",
{
"requireParamDescription": false,
"requireReturnDescription": false,
"requireReturn": true
}
],
"max-len": [
"error",
{
"code": 210,
"ignoreUrls": true
}
],
"quote-props": ["error", "as-needed"],
"object-curly-spacing": "off",
"space-before-function-paren": "off",
"semi": "error",
"no-console": "error",
"@typescript-eslint/no-var-requires": "off",
"no-extra-semi": "error",
"@typescript-eslint/no-unused-vars": ["off"]
}
}
3 changes: 3 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Contributing

If you want to contribute to hypixel-api-reborn, feel free to fork the repository and submit pull request.

## Setup

1. Fork the repository.
2. Run `npm ci`.
3. Code your idea.
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ about: Report a bug
### Bug report

- Part of code where error occurred
- What error occurred
- What error occurred
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
**Please describe changes**

*Description*
_Description_

- [x] I've added new features. (methods or parameters)
- [ ] I've added jsdoc and typings.
- [ ] I've fixed bug. (*optional* you can mention a issue if there is one)
- [ ] I've fixed bug. (_optional_ you can mention a issue if there is one)
- [ ] I've corrected the spelling in README, documentation, etc.
- [ ] I've tested my code. (`npm run test`)
- [ ] I've tested my code. (`npm run test`)
2 changes: 2 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Security Policy

## Supported Versions

| Version | Supported |
| ------- | ------------------ |
| 8.2.x | :white_check_mark: |
Expand All @@ -12,6 +13,7 @@
If a vulnerability is found within this project, as long as you follow the steps for responsible disclosure, there will be no issue and the team will be greatful for your actions.

To report a vulnerability you can do so in the [Discord Server](https://discord.gg/NSEBNMM) or you can contact the primary contributor of this repository using the following contact methods:

- @StavZDev on Twitter
- StavZDev#6469 on Discord
- If you struggle to get in contact, other contact methods can be found on the [website](https://stavzdev.me/).
20 changes: 10 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: "🟨"
prefix-development: "🟦"
open-pull-requests-limit: 10
labels:
- "dependencies"
- package-ecosystem: npm
directory: '/'
schedule:
interval: 'weekly'
commit-message:
prefix: '🟨'
prefix-development: '🟦'
open-pull-requests-limit: 10
labels:
- 'dependencies'
81 changes: 81 additions & 0 deletions .github/workflows/ci-cd-16x.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# This CI Workflow was deployed and configured by WarpWing and Nate.
name: CI/CD (16.x)

on:
push:
pull_request:
workflow_dispatch:

env:
NODE_VERSION: '16.x'

jobs:
es-lint:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install node dependencies
run: npm i

- name: es-lint
run: npm run eslint

tests:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install node dependencies
run: npm i

- name: Run Tests
run: npm test
env:
HYPIXEL_KEY: ${{secrets.HYPIXEL_KEY}}

build:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install node dependencies
run: npm i

- name: Build
run: npm run build --if-present

prettier:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install node dependencies
run: npm i

- name: prettier
run: npm run prettier:check
81 changes: 81 additions & 0 deletions .github/workflows/ci-cd-18x.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# This CI Workflow was deployed and configured by WarpWing and Nate.
name: CI/CD (18.x)

on:
push:
pull_request:
workflow_dispatch:

env:
NODE_VERSION: '18.x'

jobs:
es-lint:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install node dependencies
run: npm i

- name: es-lint
run: npm run eslint

tests:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install node dependencies
run: npm i

- name: Run Tests
run: npm test
env:
HYPIXEL_KEY: ${{secrets.HYPIXEL_KEY}}

build:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install node dependencies
run: npm i

- name: Build
run: npm run build --if-present

prettier:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install node dependencies
run: npm i

- name: prettier
run: npm run prettier:check
41 changes: 0 additions & 41 deletions .github/workflows/eslintFix.yml

This file was deleted.

Loading

0 comments on commit 7565441

Please sign in to comment.