Skip to content

Commit b4ca249

Browse files
committed
fix: prettier vs eslint
prettier won btw
1 parent 6842f4e commit b4ca249

File tree

4 files changed

+13
-15
lines changed

4 files changed

+13
-15
lines changed

.github/scripts/checkCoverage.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,23 @@ const info = {
3434
coveredmethods: Number(codeStats.coveredmethods)
3535
};
3636

37-
if (95 > (info.coveredstatements / info.statements) * 100) {
37+
if ((info.coveredstatements / info.statements) * 100 < 95) {
3838
throw new Error('Statements is required to be 95% or higher');
3939
}
4040

41-
if (95 > (info.coveredconditionals / info.conditionals) * 100) {
41+
if ((info.coveredconditionals / info.conditionals) * 100 < 95) {
4242
throw new Error('Conditionals is required to be 95% or higher');
4343
}
4444

45-
if (95 > (info.coveredmethods / info.methods) * 100) {
45+
if ((info.coveredmethods / info.methods) * 100 < 95) {
4646
throw new Error('Methods is required to be 95% or higher');
4747
}
4848

4949
if (
50-
95 >
5150
((info.coveredstatements + info.coveredconditionals + info.coveredmethods) /
5251
(info.statements + info.conditionals + info.methods)) *
53-
100
52+
100 <
53+
95
5454
) {
5555
throw new Error('Everythng Combinded is required to be 95% or higher');
5656
}

eslint.config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export default [
2828
'@typescript-eslint/no-unused-vars': ['error', { args: 'none' }],
2929
'@stylistic/quotes': ['error', 'single', { avoidEscape: true }],
3030
'@stylistic/array-bracket-newline': ['error', 'consistent'],
31-
'@stylistic/array-element-newline': ['warn', 'consistent'],
3231
'no-constant-condition': ['error', { checkLoops: false }],
3332
'no-extend-native': ['warn', { exceptions: ['Object'] }],
3433
'@stylistic/nonblock-statement-body-position': 'error',
@@ -75,7 +74,6 @@ export default [
7574
'@stylistic/arrow-parens': 'error',
7675
'@stylistic/comma-dangle': 'error',
7776
'@stylistic/brace-style': 'error',
78-
'@stylistic/indent': ['error', 2],
7977
'@stylistic/key-spacing': 'error',
8078
'@stylistic/comma-style': 'error',
8179
'no-useless-constructor': 'error',

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"url": "https://github.com/Hypixel-API-Reborn/hypixel-api-reborn/issues"
1818
},
1919
"scripts": {
20-
"lint:check": "pnpm exec eslint src/",
21-
"lint": "pnpm exec eslint src/ --fix",
20+
"lint": "pnpm lint:check --fix",
21+
"lint:check": "pnpm exec eslint",
2222
"prettier:check": "pnpm exec prettier --check .",
2323
"prettier": "pnpm exec prettier --write .",
2424
"build": "pnpm exec tsc",

vitest.setup.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { config } from 'dotenv';
22
config();
3-
if (1 > (process.env.HYPIXEL_KEY || '').length) throw new Error('No API Key specified!');
3+
if ((process.env.HYPIXEL_KEY || '').length < 1) throw new Error('No API Key specified!');
44

55
export const defaultRequestData = {
66
ok: true,
@@ -11,21 +11,21 @@ export const defaultRequestData = {
1111
statusText: '',
1212
type: 'basic',
1313
url: '',
14-
clone: function (): Response {
14+
clone: (): Response => {
1515
throw new Error('Function not implemented.');
1616
},
1717
body: null,
1818
bodyUsed: false,
19-
arrayBuffer: function (): Promise<ArrayBuffer> {
19+
arrayBuffer: (): Promise<ArrayBuffer> => {
2020
throw new Error('Function not implemented.');
2121
},
22-
blob: function (): Promise<Blob> {
22+
blob: (): Promise<Blob> => {
2323
throw new Error('Function not implemented.');
2424
},
25-
formData: function (): Promise<FormData> {
25+
formData: (): Promise<FormData> => {
2626
throw new Error('Function not implemented.');
2727
},
28-
text: function (): Promise<string> {
28+
text: (): Promise<string> => {
2929
throw new Error('Function not implemented.');
3030
}
3131
};

0 commit comments

Comments
 (0)