From 0220e1230d38dbab11e3bdee2d9b295cd8d60ec6 Mon Sep 17 00:00:00 2001 From: Jacob Date: Sat, 31 Aug 2024 23:43:04 +0800 Subject: [PATCH] Sort Imports --- eslint.config.js | 8 +++- package.json | 5 ++- pnpm-lock.yaml | 14 +++++++ src/API/getAchievements.test.ts | 8 ++-- src/API/getAchievements.ts | 4 +- src/API/getActiveHouses.test.ts | 4 +- src/API/getActiveHouses.ts | 4 +- src/API/getBoosters.test.ts | 4 +- src/API/getBoosters.ts | 4 +- src/API/getChallenges.test.ts | 6 +-- src/API/getChallenges.ts | 4 +- src/API/getGameCounts.test.ts | 4 +- src/API/getGameCounts.ts | 6 +-- src/API/getGuild.test.ts | 10 ++--- src/API/getGuild.ts | 6 +-- src/API/getGuildAchievements.test.ts | 6 +-- src/API/getGuildAchievements.ts | 4 +- src/API/getHouse.test.ts | 4 +- src/API/getHouse.ts | 4 +- src/API/getLeaderboards.test.ts | 4 +- src/API/getLeaderboards.ts | 6 +-- src/API/getPlayer.test.ts | 20 +++++----- src/API/getPlayer.ts | 4 +- src/API/getPlayerHouses.test.ts | 4 +- src/API/getPlayerHouses.ts | 4 +- src/API/getQuests.test.ts | 6 +-- src/API/getQuests.ts | 6 +-- src/API/getRecentGames.test.ts | 4 +- src/API/getRecentGames.ts | 6 +-- src/API/getSkyblockAuction.test.ts | 6 +-- src/API/getSkyblockAuction.ts | 4 +- src/API/getSkyblockAuctions.test.ts | 8 ++-- src/API/getSkyblockAuctions.ts | 6 +-- src/API/getSkyblockAuctionsByPlayer.test.ts | 6 +-- src/API/getSkyblockAuctionsByPlayer.ts | 4 +- src/API/getSkyblockBazaar.test.ts | 6 +-- src/API/getSkyblockBazaar.ts | 4 +- src/API/getSkyblockBingo.test.ts | 4 +- src/API/getSkyblockBingo.ts | 4 +- src/API/getSkyblockFireSales.test.ts | 2 +- src/API/getSkyblockFireSales.ts | 4 +- src/API/getSkyblockGarden.test.ts | 4 +- src/API/getSkyblockGarden.ts | 4 +- src/API/getSkyblockGovernment.test.ts | 4 +- src/API/getSkyblockGovernment.ts | 4 +- src/API/getSkyblockMember.test.ts | 22 +++++------ src/API/getSkyblockMember.ts | 4 +- src/API/getSkyblockMuseum.test.ts | 4 +- src/API/getSkyblockMuseum.ts | 4 +- src/API/getSkyblockNews.test.ts | 2 +- src/API/getSkyblockNews.ts | 4 +- src/API/getSkyblockProfiles.test.ts | 4 +- src/API/getSkyblockProfiles.ts | 4 +- src/API/getStatus.test.ts | 4 +- src/API/getStatus.ts | 4 +- src/API/getWatchdogStats.test.ts | 4 +- src/API/getWatchdogStats.ts | 4 +- src/Client.test.ts | 8 ++-- src/Client.ts | 6 +-- src/Private/CacheHandler.test.ts | 4 +- src/Private/CacheHandler.ts | 2 +- src/Private/Endpoint.test.ts | 4 +- src/Private/RateLimit.test.ts | 4 +- src/Private/Requests.test.ts | 4 +- src/Private/Requests.ts | 2 +- src/Private/Updater.test.ts | 6 +-- src/Private/Updater.ts | 2 +- src/structures/GameCounts.ts | 2 +- src/structures/Guild/Guild.ts | 6 +-- src/structures/MiniGames/Arcade.ts | 4 +- src/structures/MiniGames/Duels.ts | 2 +- src/structures/MiniGames/Pit.ts | 4 +- src/structures/MiniGames/SkyWars.ts | 2 +- src/structures/Player.ts | 42 ++++++++++----------- src/structures/PlayerCosmetics.ts | 2 +- src/structures/SkyBlock/Auctions/Auction.ts | 2 +- src/structures/SkyBlock/SkyblockGarden.ts | 2 +- src/structures/SkyBlock/SkyblockMember.ts | 28 +++++++------- src/structures/SkyBlock/SkyblockPet.ts | 2 +- src/structures/Static/Challenges.ts | 2 +- src/structures/Static/GameAchievements.ts | 2 +- src/structures/Static/GameQuests.ts | 2 +- src/structures/Static/Quests.ts | 2 +- src/typings/index.d.ts | 28 +++++++------- src/utils/SkyblockUtils.test.ts | 2 +- src/utils/SkyblockUtils.ts | 2 +- src/utils/divide.test.ts | 2 +- src/utils/isGuildID.test.ts | 2 +- src/utils/isUUID.test.ts | 2 +- src/utils/romanize.test.ts | 2 +- 90 files changed, 260 insertions(+), 239 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 4057b864..646370d7 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,6 +1,7 @@ +import globals from 'globals'; import prettier from 'eslint-config-prettier'; +import sortImports from '@j4cobi/eslint-plugin-sort-imports'; import ts from 'typescript-eslint'; -import globals from 'globals'; export default [ ...ts.configs.recommended, @@ -15,7 +16,12 @@ export default [ ...globals.node } }, + plugins: { 'sort-imports': sortImports }, rules: { + 'sort-imports/sort-imports': [ + 'error', + { ignoreCase: false, ignoreMemberSort: false, memberSyntaxSortOrder: ['all', 'single', 'multiple', 'none'] } + ], 'max-len': ['error', { code: 120, ignoreUrls: true, ignoreComments: true }], '@typescript-eslint/no-unused-vars': ['error', { args: 'none' }], 'no-constant-condition': ['error', { checkLoops: false }], diff --git a/package.json b/package.json index 0bc480f8..7a7cfac8 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,8 @@ "packageManager": "pnpm@9.7.1", "author": "Kathund", "dependencies": { - "farming-weight": "^0.4.12", "axios": "^1.7.5", + "farming-weight": "^0.4.12", "node-cache": "^5.1.2", "prismarine-nbt": "^2.5.0", "rss-parser": "^3.13.0", @@ -46,11 +46,12 @@ "publisher": "Kathund", "devDependencies": { "@eslint/js": "^9.9.1", + "@j4cobi/eslint-plugin-sort-imports": "^1.0.2", "@types/eslint": "^9.6.1", + "@types/node": "^20.16.2", "@vitest/coverage-v8": "^2.0.5", "@vitest/ui": "^2.0.5", "dotenv": "^16.4.5", - "@types/node": "^20.16.2", "eslint": "^9.9.1", "eslint-config-prettier": "^9.1.0", "globals": "^15.9.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fb6752ae..e7917376 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,6 +30,9 @@ importers: '@eslint/js': specifier: ^9.9.1 version: 9.9.1 + '@j4cobi/eslint-plugin-sort-imports': + specifier: ^1.0.2 + version: 1.0.2(eslint@9.9.1)(typescript@5.5.4) '@types/eslint': specifier: ^9.6.1 version: 9.6.1 @@ -273,6 +276,9 @@ packages: resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} engines: {node: '>=8'} + '@j4cobi/eslint-plugin-sort-imports@1.0.2': + resolution: {integrity: sha512-0bTHYIohk2RnWW8+FQoE06s/80aF1iPxP62JiS2+9chUFrs9D7+p0niFtNctcZGRPo5aOKG9q/ypPlT8OWcwyg==} + '@jridgewell/gen-mapping@0.3.5': resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} engines: {node: '>=6.0.0'} @@ -1441,6 +1447,14 @@ snapshots: '@istanbuljs/schema@0.1.3': {} + '@j4cobi/eslint-plugin-sort-imports@1.0.2(eslint@9.9.1)(typescript@5.5.4)': + dependencies: + '@typescript-eslint/utils': 8.3.0(eslint@9.9.1)(typescript@5.5.4) + transitivePeerDependencies: + - eslint + - supports-color + - typescript + '@jridgewell/gen-mapping@0.3.5': dependencies: '@jridgewell/set-array': 1.2.1 diff --git a/src/API/getAchievements.test.ts b/src/API/getAchievements.test.ts index 077cf8a4..cee1923a 100644 --- a/src/API/getAchievements.test.ts +++ b/src/API/getAchievements.test.ts @@ -1,10 +1,10 @@ -import GameAchievements from '../structures/Static/GameAchievements'; +import Achievement from '../structures/Static/Achievement'; import AchievementTier from '../structures/Static/AchievementTier'; import Achievements from '../structures/Static/Achievements'; -import Achievement from '../structures/Static/Achievement'; -import { expect, expectTypeOf, test } from 'vitest'; -import { StaticGameNames } from '../typings'; import Client from '../Client'; +import GameAchievements from '../structures/Static/GameAchievements'; +import { StaticGameNames } from '../typings'; +import { expect, expectTypeOf, test } from 'vitest'; test('getAchievements (raw)', async () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getAchievements.ts b/src/API/getAchievements.ts index 99ec1411..3b832b82 100644 --- a/src/API/getAchievements.ts +++ b/src/API/getAchievements.ts @@ -1,7 +1,7 @@ import Achievements from '../structures/Static/Achievements'; -import { RequestOptions } from '../Private/Requests'; -import Endpoint from '../Private/Endpoint'; import Client from '../Client'; +import Endpoint from '../Private/Endpoint'; +import { RequestOptions } from '../Private/Requests'; class getAchievements extends Endpoint { readonly client: Client; diff --git a/src/API/getActiveHouses.test.ts b/src/API/getActiveHouses.test.ts index 9df2d837..8db451e4 100644 --- a/src/API/getActiveHouses.test.ts +++ b/src/API/getActiveHouses.test.ts @@ -1,6 +1,6 @@ -import { expect, expectTypeOf, test } from 'vitest'; -import House from '../structures/House'; import Client from '../Client'; +import House from '../structures/House'; +import { expect, expectTypeOf, test } from 'vitest'; test('getActiveHouses (raw)', async () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getActiveHouses.ts b/src/API/getActiveHouses.ts index 63d75621..1b0d1822 100644 --- a/src/API/getActiveHouses.ts +++ b/src/API/getActiveHouses.ts @@ -1,7 +1,7 @@ -import { RequestOptions } from '../Private/Requests'; +import Client from '../Client'; import Endpoint from '../Private/Endpoint'; import House from '../structures/House'; -import Client from '../Client'; +import { RequestOptions } from '../Private/Requests'; class getActiveHouses extends Endpoint { readonly client: Client; diff --git a/src/API/getBoosters.test.ts b/src/API/getBoosters.test.ts index 377c80f0..c4c9ca7e 100644 --- a/src/API/getBoosters.test.ts +++ b/src/API/getBoosters.test.ts @@ -1,7 +1,7 @@ import Booster from '../structures/Boosters/Booster'; -import { expect, expectTypeOf, test } from 'vitest'; -import Game from '../structures/Game'; import Client from '../Client'; +import Game from '../structures/Game'; +import { expect, expectTypeOf, test } from 'vitest'; test('getBoosters (raw)', async () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getBoosters.ts b/src/API/getBoosters.ts index 743323f8..85bb3a55 100644 --- a/src/API/getBoosters.ts +++ b/src/API/getBoosters.ts @@ -1,7 +1,7 @@ -import { RequestOptions } from '../Private/Requests'; import Booster from '../structures/Boosters/Booster'; -import Endpoint from '../Private/Endpoint'; import Client from '../Client'; +import Endpoint from '../Private/Endpoint'; +import { RequestOptions } from '../Private/Requests'; class getBoosters extends Endpoint { readonly client: Client; diff --git a/src/API/getChallenges.test.ts b/src/API/getChallenges.test.ts index bf9bc768..31c02922 100644 --- a/src/API/getChallenges.test.ts +++ b/src/API/getChallenges.test.ts @@ -1,8 +1,8 @@ -import GameChallenges, { ChallengeData } from '../structures/Static/GameChallenges'; import Challenges from '../structures/Static/Challenges'; -import { expect, expectTypeOf, test } from 'vitest'; -import { StaticGameNames } from '../typings'; import Client from '../Client'; +import GameChallenges, { ChallengeData } from '../structures/Static/GameChallenges'; +import { StaticGameNames } from '../typings'; +import { expect, expectTypeOf, test } from 'vitest'; test('getChallenges (raw)', async () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getChallenges.ts b/src/API/getChallenges.ts index 98ec21c4..b9632b5a 100644 --- a/src/API/getChallenges.ts +++ b/src/API/getChallenges.ts @@ -1,7 +1,7 @@ import Challenges from '../structures/Static/Challenges'; -import { RequestOptions } from '../Private/Requests'; -import Endpoint from '../Private/Endpoint'; import Client from '../Client'; +import Endpoint from '../Private/Endpoint'; +import { RequestOptions } from '../Private/Requests'; class getChallenges extends Endpoint { readonly client: Client; diff --git a/src/API/getGameCounts.test.ts b/src/API/getGameCounts.test.ts index 65fa4eab..ceb44825 100644 --- a/src/API/getGameCounts.test.ts +++ b/src/API/getGameCounts.test.ts @@ -1,6 +1,6 @@ -import { expect, expectTypeOf, test } from 'vitest'; -import GameCounts from '../structures/GameCounts'; import Client from '../Client'; +import GameCounts from '../structures/GameCounts'; +import { expect, expectTypeOf, test } from 'vitest'; test('getGameCounts (raw)', async () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getGameCounts.ts b/src/API/getGameCounts.ts index c40e755f..1a158984 100644 --- a/src/API/getGameCounts.ts +++ b/src/API/getGameCounts.ts @@ -1,7 +1,7 @@ -import { RequestOptions } from '../Private/Requests'; -import GameCounts from '../structures/GameCounts'; -import Endpoint from '../Private/Endpoint'; import Client from '../Client'; +import Endpoint from '../Private/Endpoint'; +import GameCounts from '../structures/GameCounts'; +import { RequestOptions } from '../Private/Requests'; class getGameCounts extends Endpoint { readonly client: Client; diff --git a/src/API/getGuild.test.ts b/src/API/getGuild.test.ts index e9930bea..8cb1fa68 100644 --- a/src/API/getGuild.test.ts +++ b/src/API/getGuild.test.ts @@ -1,11 +1,11 @@ +import Client from '../Client'; +import Color from '../structures/Color'; +import Game from '../structures/Game'; +import Guild from '../structures/Guild/Guild'; import GuildMember from '../structures/Guild/GuildMember'; import GuildRank from '../structures/Guild/GuildRank'; -import { expect, expectTypeOf, test } from 'vitest'; -import Guild from '../structures/Guild/Guild'; import { ExpHistory } from '../utils/Guild'; -import Color from '../structures/Color'; -import Game from '../structures/Game'; -import Client from '../Client'; +import { expect, expectTypeOf, test } from 'vitest'; test('Invalid Guild Type', () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getGuild.ts b/src/API/getGuild.ts index 487e9b42..be2f31c5 100644 --- a/src/API/getGuild.ts +++ b/src/API/getGuild.ts @@ -1,8 +1,8 @@ -import { RequestOptions } from '../Private/Requests'; +import Client from '../Client'; +import Endpoint from '../Private/Endpoint'; import Guild from '../structures/Guild/Guild'; import isGuildID from '../utils/isGuildID'; -import Endpoint from '../Private/Endpoint'; -import Client from '../Client'; +import { RequestOptions } from '../Private/Requests'; class getGuild extends Endpoint { readonly client: Client; diff --git a/src/API/getGuildAchievements.test.ts b/src/API/getGuildAchievements.test.ts index 750dafca..a0c13f77 100644 --- a/src/API/getGuildAchievements.test.ts +++ b/src/API/getGuildAchievements.test.ts @@ -1,8 +1,8 @@ -import GuildAchievements from '../structures/Static/GuildAchievements'; -import AchievementTier from '../structures/Static/AchievementTier'; import Achievement from '../structures/Static/Achievement'; -import { expect, expectTypeOf, test } from 'vitest'; +import AchievementTier from '../structures/Static/AchievementTier'; import Client from '../Client'; +import GuildAchievements from '../structures/Static/GuildAchievements'; +import { expect, expectTypeOf, test } from 'vitest'; test('getGuildAchievements (raw)', async () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getGuildAchievements.ts b/src/API/getGuildAchievements.ts index 309cb40b..4f1e824e 100644 --- a/src/API/getGuildAchievements.ts +++ b/src/API/getGuildAchievements.ts @@ -1,7 +1,7 @@ +import Client from '../Client'; +import Endpoint from '../Private/Endpoint'; import GuildAchievements from '../structures/Static/GuildAchievements'; import { RequestOptions } from '../Private/Requests'; -import Endpoint from '../Private/Endpoint'; -import Client from '../Client'; class getGuildAchievements extends Endpoint { readonly client: Client; diff --git a/src/API/getHouse.test.ts b/src/API/getHouse.test.ts index 05a19857..7a92348d 100644 --- a/src/API/getHouse.test.ts +++ b/src/API/getHouse.test.ts @@ -1,6 +1,6 @@ -import { expect, expectTypeOf, test } from 'vitest'; -import House from '../structures/House'; import Client from '../Client'; +import House from '../structures/House'; +import { expect, expectTypeOf, test } from 'vitest'; test('getHouse (raw)', async () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getHouse.ts b/src/API/getHouse.ts index 9d6c93c2..431df1b1 100644 --- a/src/API/getHouse.ts +++ b/src/API/getHouse.ts @@ -1,7 +1,7 @@ -import { RequestOptions } from '../Private/Requests'; +import Client from '../Client'; import Endpoint from '../Private/Endpoint'; import House from '../structures/House'; -import Client from '../Client'; +import { RequestOptions } from '../Private/Requests'; class getHouse extends Endpoint { readonly client: Client; diff --git a/src/API/getLeaderboards.test.ts b/src/API/getLeaderboards.test.ts index a57f89d8..e3a0d002 100644 --- a/src/API/getLeaderboards.test.ts +++ b/src/API/getLeaderboards.test.ts @@ -1,6 +1,6 @@ -import { expect, expectTypeOf, test } from 'vitest'; -import Leaderboard from '../structures/Leaderboard'; import Client from '../Client'; +import Leaderboard from '../structures/Leaderboard'; +import { expect, expectTypeOf, test } from 'vitest'; test('getLeaderboards (raw)', async () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getLeaderboards.ts b/src/API/getLeaderboards.ts index 53960151..c3a75592 100644 --- a/src/API/getLeaderboards.ts +++ b/src/API/getLeaderboards.ts @@ -1,8 +1,8 @@ -import { RequestOptions } from '../Private/Requests'; -import Leaderboard from '../structures/Leaderboard'; +import Client from '../Client'; import Constants from '../utils/Constants'; import Endpoint from '../Private/Endpoint'; -import Client from '../Client'; +import Leaderboard from '../structures/Leaderboard'; +import { RequestOptions } from '../Private/Requests'; class getLeaderboards extends Endpoint { readonly client: Client; diff --git a/src/API/getPlayer.test.ts b/src/API/getPlayer.test.ts index 2456318b..66ca6009 100644 --- a/src/API/getPlayer.test.ts +++ b/src/API/getPlayer.test.ts @@ -1,22 +1,24 @@ -import Player, { LevelProgress, PlayerRank, PlayerSocialMedia, RanksPurchaseTime } from '../structures/Player'; -import { expect, expectTypeOf, test } from 'vitest'; -import PlayerCosmetics from '../structures/PlayerCosmetics'; -import Guild from '../structures/Guild/Guild'; -import Color from '../structures/Color'; -import Game from '../structures/Game'; -import Client from '../Client'; import Arcade from '../structures/MiniGames/Arcade'; import ArenaBrawl from '../structures/MiniGames/ArenaBrawl'; import BedWars from '../structures/MiniGames/BedWars'; import BlitzSurvivalGames from '../structures/MiniGames/BlitzSurvivalGames'; import BuildBattle from '../structures/MiniGames/BuildBattle'; +import Client from '../Client'; +import Color from '../structures/Color'; import CopsAndCrims from '../structures/MiniGames/CopsAndCrims'; import Duels from '../structures/MiniGames/Duels'; +import Game from '../structures/Game'; +import Guild from '../structures/Guild/Guild'; +import House from '../structures/House'; import MegaWalls from '../structures/MiniGames/MegaWalls'; import MurderMystery from '../structures/MiniGames/MurderMystery'; import Paintball from '../structures/MiniGames/Paintball'; import Pit, { PitArmor } from '../structures/MiniGames/Pit'; +import PitInventoryItem from '../structures/MiniGames/PitInventoryItem'; +import Player, { LevelProgress, PlayerRank, PlayerSocialMedia, RanksPurchaseTime } from '../structures/Player'; +import PlayerCosmetics from '../structures/PlayerCosmetics'; import Quakecraft from '../structures/MiniGames/Quakecraft'; +import RecentGame from '../structures/RecentGame'; import SkyWars from '../structures/MiniGames/SkyWars'; import SmashHeroes from '../structures/MiniGames/SmashHeroes'; import SpeedUHC from '../structures/MiniGames/SpeedUHC'; @@ -27,9 +29,7 @@ import VampireZ from '../structures/MiniGames/VampireZ'; import Walls from '../structures/MiniGames/Walls'; import Warlords from '../structures/MiniGames/Warlords'; import WoolWars from '../structures/MiniGames/WoolWars'; -import PitInventoryItem from '../structures/MiniGames/PitInventoryItem'; -import House from '../structures/House'; -import RecentGame from '../structures/RecentGame'; +import { expect, expectTypeOf, test } from 'vitest'; test('No Player Input', () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getPlayer.ts b/src/API/getPlayer.ts index 06dd245f..d1745340 100644 --- a/src/API/getPlayer.ts +++ b/src/API/getPlayer.ts @@ -1,7 +1,7 @@ -import { PlayerRequestOptions } from './API'; +import Client from '../Client'; import Endpoint from '../Private/Endpoint'; import Player from '../structures/Player'; -import Client from '../Client'; +import { PlayerRequestOptions } from './API'; class getPlayer extends Endpoint { readonly client: Client; diff --git a/src/API/getPlayerHouses.test.ts b/src/API/getPlayerHouses.test.ts index 238bd5a6..e43c3cee 100644 --- a/src/API/getPlayerHouses.test.ts +++ b/src/API/getPlayerHouses.test.ts @@ -1,6 +1,6 @@ -import { expect, expectTypeOf, test } from 'vitest'; -import House from '../structures/House'; import Client from '../Client'; +import House from '../structures/House'; +import { expect, expectTypeOf, test } from 'vitest'; test('getPlayerHouses (No input)', () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getPlayerHouses.ts b/src/API/getPlayerHouses.ts index e16cea5d..855c8bfa 100644 --- a/src/API/getPlayerHouses.ts +++ b/src/API/getPlayerHouses.ts @@ -1,7 +1,7 @@ -import { RequestOptions } from '../Private/Requests'; +import Client from '../Client'; import Endpoint from '../Private/Endpoint'; import House from '../structures/House'; -import Client from '../Client'; +import { RequestOptions } from '../Private/Requests'; class getPlayerHouses extends Endpoint { readonly client: Client; diff --git a/src/API/getQuests.test.ts b/src/API/getQuests.test.ts index 4fe505b8..85d2c855 100644 --- a/src/API/getQuests.test.ts +++ b/src/API/getQuests.test.ts @@ -1,9 +1,9 @@ +import Client from '../Client'; import GameQuests from '../structures/Static/GameQuests'; -import { expect, expectTypeOf, test } from 'vitest'; -import Quests from '../structures/Static/Quests'; import Quest from '../structures/Static/Quest'; +import Quests from '../structures/Static/Quests'; import { StaticGameNames } from '../typings'; -import Client from '../Client'; +import { expect, expectTypeOf, test } from 'vitest'; test('getQuests (raw)', async () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getQuests.ts b/src/API/getQuests.ts index b1f3652d..07d772e9 100644 --- a/src/API/getQuests.ts +++ b/src/API/getQuests.ts @@ -1,7 +1,7 @@ -import { RequestOptions } from '../Private/Requests'; -import Quests from '../structures/Static/Quests'; -import Endpoint from '../Private/Endpoint'; import Client from '../Client'; +import Endpoint from '../Private/Endpoint'; +import Quests from '../structures/Static/Quests'; +import { RequestOptions } from '../Private/Requests'; class getQuests extends Endpoint { readonly client: Client; diff --git a/src/API/getRecentGames.test.ts b/src/API/getRecentGames.test.ts index 7f971495..85e6ec46 100644 --- a/src/API/getRecentGames.test.ts +++ b/src/API/getRecentGames.test.ts @@ -1,6 +1,6 @@ -import { expect, expectTypeOf, test } from 'vitest'; -import RecentGame from '../structures/RecentGame'; import Client from '../Client'; +import RecentGame from '../structures/RecentGame'; +import { expect, expectTypeOf, test } from 'vitest'; test('getRecentGames (no input)', () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getRecentGames.ts b/src/API/getRecentGames.ts index fef1a95d..c4dac6db 100644 --- a/src/API/getRecentGames.ts +++ b/src/API/getRecentGames.ts @@ -1,7 +1,7 @@ -import { RequestOptions } from '../Private/Requests'; -import RecentGame from '../structures/RecentGame'; -import Endpoint from '../Private/Endpoint'; import Client from '../Client'; +import Endpoint from '../Private/Endpoint'; +import RecentGame from '../structures/RecentGame'; +import { RequestOptions } from '../Private/Requests'; class getRecentGames extends Endpoint { readonly client: Client; diff --git a/src/API/getSkyblockAuction.test.ts b/src/API/getSkyblockAuction.test.ts index 48aa5ae0..1abdf269 100644 --- a/src/API/getSkyblockAuction.test.ts +++ b/src/API/getSkyblockAuction.test.ts @@ -1,9 +1,9 @@ import Auction from '../structures/SkyBlock/Auctions/Auction'; -import { SkyblockRarity } from '../utils/SkyblockUtils'; import Bid from '../structures/SkyBlock/Auctions/Bid'; -import { expect, expectTypeOf, test } from 'vitest'; -import ItemBytes from '../structures/ItemBytes'; import Client from '../Client'; +import ItemBytes from '../structures/ItemBytes'; +import { SkyblockRarity } from '../utils/SkyblockUtils'; +import { expect, expectTypeOf, test } from 'vitest'; test('getSkyblockAuction (raw)', async () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getSkyblockAuction.ts b/src/API/getSkyblockAuction.ts index 91d88ba1..17658334 100644 --- a/src/API/getSkyblockAuction.ts +++ b/src/API/getSkyblockAuction.ts @@ -1,7 +1,7 @@ import Auction from '../structures/SkyBlock/Auctions/Auction'; -import { AuctionRequestOptions } from './API'; -import Endpoint from '../Private/Endpoint'; import Client from '../Client'; +import Endpoint from '../Private/Endpoint'; +import { AuctionRequestOptions } from './API'; class getSkyblockAction extends Endpoint { readonly client: Client; diff --git a/src/API/getSkyblockAuctions.test.ts b/src/API/getSkyblockAuctions.test.ts index a67acfbe..7279fbb0 100644 --- a/src/API/getSkyblockAuctions.test.ts +++ b/src/API/getSkyblockAuctions.test.ts @@ -1,10 +1,10 @@ -import AuctionInfo from '../structures/SkyBlock/Auctions/AuctionInfo'; import Auction from '../structures/SkyBlock/Auctions/Auction'; -import { SkyblockRarity } from '../utils/SkyblockUtils'; +import AuctionInfo from '../structures/SkyBlock/Auctions/AuctionInfo'; import Bid from '../structures/SkyBlock/Auctions/Bid'; -import { expect, expectTypeOf, test } from 'vitest'; -import ItemBytes from '../structures/ItemBytes'; import Client from '../Client'; +import ItemBytes from '../structures/ItemBytes'; +import { SkyblockRarity } from '../utils/SkyblockUtils'; +import { expect, expectTypeOf, test } from 'vitest'; test('getSkyblockAuctions (raw)', async () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getSkyblockAuctions.ts b/src/API/getSkyblockAuctions.ts index fd2b3e3d..1a44ff74 100644 --- a/src/API/getSkyblockAuctions.ts +++ b/src/API/getSkyblockAuctions.ts @@ -1,8 +1,8 @@ -import AuctionInfo from '../structures/SkyBlock/Auctions/AuctionInfo'; import Auction from '../structures/SkyBlock/Auctions/Auction'; -import { AuctionRequestOptions } from './API'; -import Endpoint from '../Private/Endpoint'; +import AuctionInfo from '../structures/SkyBlock/Auctions/AuctionInfo'; import Client from '../Client'; +import Endpoint from '../Private/Endpoint'; +import { AuctionRequestOptions } from './API'; class getSkyblockAuctions extends Endpoint { readonly client: Client; diff --git a/src/API/getSkyblockAuctionsByPlayer.test.ts b/src/API/getSkyblockAuctionsByPlayer.test.ts index 24515665..29bab135 100644 --- a/src/API/getSkyblockAuctionsByPlayer.test.ts +++ b/src/API/getSkyblockAuctionsByPlayer.test.ts @@ -1,9 +1,9 @@ import Auction from '../structures/SkyBlock/Auctions/Auction'; -import { SkyblockRarity } from '../utils/SkyblockUtils'; import Bid from '../structures/SkyBlock/Auctions/Bid'; -import { expect, expectTypeOf, test } from 'vitest'; -import ItemBytes from '../structures/ItemBytes'; import Client from '../Client'; +import ItemBytes from '../structures/ItemBytes'; +import { SkyblockRarity } from '../utils/SkyblockUtils'; +import { expect, expectTypeOf, test } from 'vitest'; test('getSkyblockAuctionsByPlayer (raw)', async () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getSkyblockAuctionsByPlayer.ts b/src/API/getSkyblockAuctionsByPlayer.ts index 7f482a27..e6a3823d 100644 --- a/src/API/getSkyblockAuctionsByPlayer.ts +++ b/src/API/getSkyblockAuctionsByPlayer.ts @@ -1,7 +1,7 @@ import Auction from '../structures/SkyBlock/Auctions/Auction'; -import { AuctionRequestOptions } from './API'; -import Endpoint from '../Private/Endpoint'; import Client from '../Client'; +import Endpoint from '../Private/Endpoint'; +import { AuctionRequestOptions } from './API'; class getSkyblockActionsByPlayer extends Endpoint { readonly client: Client; diff --git a/src/API/getSkyblockBazaar.test.ts b/src/API/getSkyblockBazaar.test.ts index 1aad4ff3..ba3b94a3 100644 --- a/src/API/getSkyblockBazaar.test.ts +++ b/src/API/getSkyblockBazaar.test.ts @@ -1,7 +1,7 @@ -import { expect, expectTypeOf, test } from 'vitest'; -import Product from '../structures/SkyBlock/Bazzar/Product'; -import Order from '../structures/SkyBlock/Bazzar/Order'; import Client from '../Client'; +import Order from '../structures/SkyBlock/Bazzar/Order'; +import Product from '../structures/SkyBlock/Bazzar/Product'; +import { expect, expectTypeOf, test } from 'vitest'; test('getSkyblockBazarr (raw)', async () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getSkyblockBazaar.ts b/src/API/getSkyblockBazaar.ts index cc2a8530..41452f5e 100644 --- a/src/API/getSkyblockBazaar.ts +++ b/src/API/getSkyblockBazaar.ts @@ -1,7 +1,7 @@ +import Client from '../Client'; +import Endpoint from '../Private/Endpoint'; import Product from '../structures/SkyBlock/Bazzar/Product'; import { RequestOptions } from '../Private/Requests'; -import Endpoint from '../Private/Endpoint'; -import Client from '../Client'; class getSkyblockBazaar extends Endpoint { readonly client: Client; diff --git a/src/API/getSkyblockBingo.test.ts b/src/API/getSkyblockBingo.test.ts index cfdc96ec..3240fc80 100644 --- a/src/API/getSkyblockBingo.test.ts +++ b/src/API/getSkyblockBingo.test.ts @@ -1,7 +1,7 @@ -import BingoData from '../structures/SkyBlock/Static/BingoData'; import Bingo from '../structures/SkyBlock/Static/Bingo'; -import { expect, expectTypeOf, test } from 'vitest'; +import BingoData from '../structures/SkyBlock/Static/BingoData'; import Client from '../Client'; +import { expect, expectTypeOf, test } from 'vitest'; test('getSkyblockBingo (raw)', async () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getSkyblockBingo.ts b/src/API/getSkyblockBingo.ts index 887ff5d0..137618a3 100644 --- a/src/API/getSkyblockBingo.ts +++ b/src/API/getSkyblockBingo.ts @@ -1,7 +1,7 @@ import BingoData from '../structures/SkyBlock/Static/BingoData'; -import { RequestOptions } from '../Private/Requests'; -import Endpoint from '../Private/Endpoint'; import Client from '../Client'; +import Endpoint from '../Private/Endpoint'; +import { RequestOptions } from '../Private/Requests'; class getSkyblockBingo extends Endpoint { readonly client: Client; diff --git a/src/API/getSkyblockFireSales.test.ts b/src/API/getSkyblockFireSales.test.ts index 54276f46..19fb1e71 100644 --- a/src/API/getSkyblockFireSales.test.ts +++ b/src/API/getSkyblockFireSales.test.ts @@ -1,6 +1,6 @@ +import Client from '../Client'; import FireSale from '../structures/SkyBlock/Static/FireSale'; import { expect, expectTypeOf, test } from 'vitest'; -import Client from '../Client'; test('getSkyblockFireSales (raw)', async () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getSkyblockFireSales.ts b/src/API/getSkyblockFireSales.ts index d7de84d3..fa4a1e73 100644 --- a/src/API/getSkyblockFireSales.ts +++ b/src/API/getSkyblockFireSales.ts @@ -1,7 +1,7 @@ +import Client from '../Client'; +import Endpoint from '../Private/Endpoint'; import FireSale from '../structures/SkyBlock/Static/FireSale'; import { RequestOptions } from '../Private/Requests'; -import Endpoint from '../Private/Endpoint'; -import Client from '../Client'; class getSkyblockFireSales extends Endpoint { readonly client: Client; diff --git a/src/API/getSkyblockGarden.test.ts b/src/API/getSkyblockGarden.test.ts index 1b64e206..38cf0d6c 100644 --- a/src/API/getSkyblockGarden.test.ts +++ b/src/API/getSkyblockGarden.test.ts @@ -1,12 +1,12 @@ +import Client from '../Client'; import SkyblockGarden, { - SkyblockGardenCropMilestones, SkyblockGardenComposter, + SkyblockGardenCropMilestones, SkyblockGardenVisitor, SkyblockGarenCrops } from '../structures/SkyBlock/SkyblockGarden'; import { SkyblockSkillLevel } from '../utils/SkyblockUtils'; import { expect, expectTypeOf, test } from 'vitest'; -import Client from '../Client'; test('getSkyblockGarden (no input)', () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getSkyblockGarden.ts b/src/API/getSkyblockGarden.ts index cba1b0d7..05b7ad9c 100644 --- a/src/API/getSkyblockGarden.ts +++ b/src/API/getSkyblockGarden.ts @@ -1,7 +1,7 @@ +import Client from '../Client'; +import Endpoint from '../Private/Endpoint'; import SkyblockGarden from '../structures/SkyBlock/SkyblockGarden'; import { RequestOptions } from '../Private/Requests'; -import Endpoint from '../Private/Endpoint'; -import Client from '../Client'; class getSkyblockGarden extends Endpoint { readonly client: Client; diff --git a/src/API/getSkyblockGovernment.test.ts b/src/API/getSkyblockGovernment.test.ts index f6ff9d2d..bb20d6bb 100644 --- a/src/API/getSkyblockGovernment.test.ts +++ b/src/API/getSkyblockGovernment.test.ts @@ -1,8 +1,8 @@ -import GovernmentData from '../structures/SkyBlock/Static/Government'; import Candidate from '../structures/SkyBlock/Static/Candidate'; +import Client from '../Client'; +import GovernmentData from '../structures/SkyBlock/Static/Government'; import Perk from '../structures/SkyBlock/Static/Perk'; import { expect, expectTypeOf, test } from 'vitest'; -import Client from '../Client'; test('getSkyblockGovernment (raw)', async () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getSkyblockGovernment.ts b/src/API/getSkyblockGovernment.ts index 997114a8..f9093623 100644 --- a/src/API/getSkyblockGovernment.ts +++ b/src/API/getSkyblockGovernment.ts @@ -1,7 +1,7 @@ +import Client from '../Client.js'; +import Endpoint from '../Private/Endpoint.js'; import GovernmentData from '../structures/SkyBlock/Static/Government.js'; import { RequestOptions } from '../Private/Requests'; -import Endpoint from '../Private/Endpoint.js'; -import Client from '../Client.js'; class getSkyblockGovernment extends Endpoint { readonly client: Client; diff --git a/src/API/getSkyblockMember.test.ts b/src/API/getSkyblockMember.test.ts index 7be8aed4..143892fe 100644 --- a/src/API/getSkyblockMember.test.ts +++ b/src/API/getSkyblockMember.test.ts @@ -1,22 +1,22 @@ +import Client from '../Client'; +import SkyblockGarden from '../structures/SkyBlock/SkyblockGarden'; +import SkyblockInventoryItem, { SkyblockGemstone } from '../structures/SkyBlock/SkyblockInventoryItem'; +import SkyblockMember, { SkyblockMemberArmor, SkyblockMemberEquipment } from '../structures/SkyBlock/SkyblockMember'; +import SkyblockMuseum from '../structures/SkyBlock/SkyblockMuseum'; +import SkyblockPet from '../structures/SkyBlock/SkyblockPet'; +import { NetworthResult } from 'skyhelper-networth'; import { SkyblockMemberChocolateFactoryData, - SkyblockMemberTrophyFishRank, - SkyblockMemberJacobData, SkyblockMemberDungeons, + SkyblockMemberJacobData, SkyblockMemberSkills, SkyblockMemberSlayer, SkyblockMemberStats, - SkyblockSkillLevel, - SkyblockRarity + SkyblockMemberTrophyFishRank, + SkyblockRarity, + SkyblockSkillLevel } from '../utils/SkyblockUtils'; -import SkyblockMember, { SkyblockMemberArmor, SkyblockMemberEquipment } from '../structures/SkyBlock/SkyblockMember'; -import SkyblockInventoryItem, { SkyblockGemstone } from '../structures/SkyBlock/SkyblockInventoryItem'; -import SkyblockGarden from '../structures/SkyBlock/SkyblockGarden'; -import SkyblockMuseum from '../structures/SkyBlock/SkyblockMuseum'; -import SkyblockPet from '../structures/SkyBlock/SkyblockPet'; -import { NetworthResult } from 'skyhelper-networth'; import { expect, expectTypeOf, test } from 'vitest'; -import Client from '../Client'; test('getSkyblockMember (raw)', async () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getSkyblockMember.ts b/src/API/getSkyblockMember.ts index df38001c..dee02463 100644 --- a/src/API/getSkyblockMember.ts +++ b/src/API/getSkyblockMember.ts @@ -1,7 +1,7 @@ +import Client from '../Client'; +import Endpoint from '../Private/Endpoint'; import SkyblockMember from '../structures/SkyBlock/SkyblockMember'; import { SkyblockRequestOptions } from './API'; -import Endpoint from '../Private/Endpoint'; -import Client from '../Client'; class getSkyblockMember extends Endpoint { readonly client: Client; diff --git a/src/API/getSkyblockMuseum.test.ts b/src/API/getSkyblockMuseum.test.ts index 0ec329bc..54934f91 100644 --- a/src/API/getSkyblockMuseum.test.ts +++ b/src/API/getSkyblockMuseum.test.ts @@ -1,9 +1,9 @@ +import Client from '../Client'; import SkyblockInventoryItem from '../structures/SkyBlock/SkyblockInventoryItem'; +import SkyblockMuseum from '../structures/SkyBlock/SkyblockMuseum'; import SkyblockMuseumItem from '../structures/SkyBlock/SkyblockMuseumItem'; import SkyblockProfile from '../structures/SkyBlock/SkyblockProfile'; -import SkyblockMuseum from '../structures/SkyBlock/SkyblockMuseum'; import { expect, expectTypeOf, test } from 'vitest'; -import Client from '../Client'; test('getSkyblockMuseum (raw)', async () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getSkyblockMuseum.ts b/src/API/getSkyblockMuseum.ts index e3af11a4..d2802041 100644 --- a/src/API/getSkyblockMuseum.ts +++ b/src/API/getSkyblockMuseum.ts @@ -1,7 +1,7 @@ +import Client from '../Client'; +import Endpoint from '../Private/Endpoint'; import SkyblockMuseum from '../structures/SkyBlock/SkyblockMuseum'; import { RequestOptions } from '../Private/Requests'; -import Endpoint from '../Private/Endpoint'; -import Client from '../Client'; class getSkyblockMuseum extends Endpoint { readonly client: Client; diff --git a/src/API/getSkyblockNews.test.ts b/src/API/getSkyblockNews.test.ts index a57db120..1ea1aa24 100644 --- a/src/API/getSkyblockNews.test.ts +++ b/src/API/getSkyblockNews.test.ts @@ -1,6 +1,6 @@ +import Client from '../Client'; import SkyblockNews from '../structures/SkyBlock/News/SkyblockNews'; import { expect, expectTypeOf, test } from 'vitest'; -import Client from '../Client'; test('getSkyblockNews (raw)', async () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getSkyblockNews.ts b/src/API/getSkyblockNews.ts index cc1e8085..681bc209 100644 --- a/src/API/getSkyblockNews.ts +++ b/src/API/getSkyblockNews.ts @@ -1,7 +1,7 @@ +import Client from '../Client'; +import Endpoint from '../Private/Endpoint'; import SkyblockNews from '../structures/SkyBlock/News/SkyblockNews'; import { RequestOptions } from '../Private/Requests'; -import Endpoint from '../Private/Endpoint'; -import Client from '../Client'; class getSkyblockNews extends Endpoint { readonly client: Client; diff --git a/src/API/getSkyblockProfiles.test.ts b/src/API/getSkyblockProfiles.test.ts index 2534cca6..05183588 100644 --- a/src/API/getSkyblockProfiles.test.ts +++ b/src/API/getSkyblockProfiles.test.ts @@ -1,7 +1,7 @@ -import SkyblockProfile from '../structures/SkyBlock/SkyblockProfile'; +import Client from '../Client'; import SkyblockMember from '../structures/SkyBlock/SkyblockMember'; +import SkyblockProfile from '../structures/SkyBlock/SkyblockProfile'; import { expect, expectTypeOf, test } from 'vitest'; -import Client from '../Client'; test('getSkyblockProfiles (raw)', async () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getSkyblockProfiles.ts b/src/API/getSkyblockProfiles.ts index 8a86bab0..887c676d 100644 --- a/src/API/getSkyblockProfiles.ts +++ b/src/API/getSkyblockProfiles.ts @@ -1,7 +1,7 @@ +import Client from '../Client'; +import Endpoint from '../Private/Endpoint'; import SkyblockProfile from '../structures/SkyBlock/SkyblockProfile'; import { SkyblockRequestOptions } from './API'; -import Endpoint from '../Private/Endpoint'; -import Client from '../Client'; class getSkyblockProfiles extends Endpoint { readonly client: Client; diff --git a/src/API/getStatus.test.ts b/src/API/getStatus.test.ts index a9960688..58b9a919 100644 --- a/src/API/getStatus.test.ts +++ b/src/API/getStatus.test.ts @@ -1,7 +1,7 @@ -import { expect, expectTypeOf, test } from 'vitest'; import Client from '../Client'; -import Status from '../structures/Status'; import Game from '../structures/Game'; +import Status from '../structures/Status'; +import { expect, expectTypeOf, test } from 'vitest'; test('getStatus (raw)', async () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getStatus.ts b/src/API/getStatus.ts index c63caa8d..ef24f4df 100644 --- a/src/API/getStatus.ts +++ b/src/API/getStatus.ts @@ -1,7 +1,7 @@ -import { RequestOptions } from '../Private/Requests'; +import Client from '../Client'; import Endpoint from '../Private/Endpoint'; import Status from '../structures/Status'; -import Client from '../Client'; +import { RequestOptions } from '../Private/Requests'; class getStatus extends Endpoint { readonly client: Client; diff --git a/src/API/getWatchdogStats.test.ts b/src/API/getWatchdogStats.test.ts index 82748f56..a2704aa5 100644 --- a/src/API/getWatchdogStats.test.ts +++ b/src/API/getWatchdogStats.test.ts @@ -1,6 +1,6 @@ -import { expect, expectTypeOf, test } from 'vitest'; -import WatchdogStats from '../structures/Watchdog/Stats'; import Client from '../Client'; +import WatchdogStats from '../structures/Watchdog/Stats'; +import { expect, expectTypeOf, test } from 'vitest'; test('getWatchdogStats (raw)', async () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false }); diff --git a/src/API/getWatchdogStats.ts b/src/API/getWatchdogStats.ts index 20ce7f7d..237156d6 100644 --- a/src/API/getWatchdogStats.ts +++ b/src/API/getWatchdogStats.ts @@ -1,7 +1,7 @@ +import Client from '../Client'; +import Endpoint from '../Private/Endpoint'; import WatchdogStats from '../structures/Watchdog/Stats'; import { RequestOptions } from '../Private/Requests'; -import Endpoint from '../Private/Endpoint'; -import Client from '../Client'; class getWatchdogStats extends Endpoint { readonly client: Client; diff --git a/src/Client.test.ts b/src/Client.test.ts index 9b6c7dc5..0ee6876d 100644 --- a/src/Client.test.ts +++ b/src/Client.test.ts @@ -1,10 +1,10 @@ -import { expect, expectTypeOf, test } from 'vitest'; import CacheHandler from './Private/CacheHandler'; -import { ClientOptions } from './typings/Client'; -import Requests from './Private/Requests'; -import Updater from './Private/Updater'; import Client from './Client'; import Errors from './Errors'; +import Requests from './Private/Requests'; +import Updater from './Private/Updater'; +import { ClientOptions } from './typings/Client'; +import { expect, expectTypeOf, test } from 'vitest'; const errors = new Errors(); test('Client (No Key)', () => { diff --git a/src/Client.ts b/src/Client.ts index 8714cbb7..28c76c60 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -1,10 +1,10 @@ +import API from './API'; import CacheHandler from './Private/CacheHandler'; -import { ClientOptions } from './typings/Client'; +import Errors from './Errors'; import RateLimit from './Private/RateLimit'; import Requests from './Private/Requests'; import Updater from './Private/Updater'; -import Errors from './Errors'; -import API from './API'; +import { ClientOptions } from './typings/Client'; const clients: Client[] = []; diff --git a/src/Private/CacheHandler.test.ts b/src/Private/CacheHandler.test.ts index a7ebc756..df9f8339 100644 --- a/src/Private/CacheHandler.test.ts +++ b/src/Private/CacheHandler.test.ts @@ -1,7 +1,7 @@ -import { expect, expectTypeOf, test } from 'vitest'; import CacheHandler from './CacheHandler'; -import NodeCache from 'node-cache'; import Client from '../Client'; +import NodeCache from 'node-cache'; +import { expect, expectTypeOf, test } from 'vitest'; test('CacheHandler', () => { const client = new Client(process.env.HYPIXEL_KEY ?? ''); diff --git a/src/Private/CacheHandler.ts b/src/Private/CacheHandler.ts index 3283c726..78d83778 100644 --- a/src/Private/CacheHandler.ts +++ b/src/Private/CacheHandler.ts @@ -1,5 +1,5 @@ -import NodeCache from 'node-cache'; import Client from '../Client'; +import NodeCache from 'node-cache'; class CacheHandler { readonly client: Client; diff --git a/src/Private/Endpoint.test.ts b/src/Private/Endpoint.test.ts index 57d1aa4c..19c2fe31 100644 --- a/src/Private/Endpoint.test.ts +++ b/src/Private/Endpoint.test.ts @@ -1,6 +1,6 @@ -import { expect, expectTypeOf, test } from 'vitest'; -import Endpoint from './Endpoint'; import Client from '../Client'; +import Endpoint from './Endpoint'; +import { expect, expectTypeOf, test } from 'vitest'; test('Endpoint', () => { const client = new Client(process.env.HYPIXEL_KEY ?? ''); diff --git a/src/Private/RateLimit.test.ts b/src/Private/RateLimit.test.ts index bad9b299..879cd3a1 100644 --- a/src/Private/RateLimit.test.ts +++ b/src/Private/RateLimit.test.ts @@ -1,7 +1,7 @@ -import { expect, expectTypeOf, test, vi } from 'vitest'; -import RateLimit from './RateLimit'; import Client from '../Client'; +import RateLimit from './RateLimit'; import axios from 'axios'; +import { expect, expectTypeOf, test, vi } from 'vitest'; test('RateLimit (None)', () => { const client = new Client(process.env.HYPIXEL_KEY ?? '', { rateLimit: 'NONE' }); diff --git a/src/Private/Requests.test.ts b/src/Private/Requests.test.ts index 927dc048..2624eaf0 100644 --- a/src/Private/Requests.test.ts +++ b/src/Private/Requests.test.ts @@ -1,7 +1,7 @@ -import { expect, expectTypeOf, test, vi } from 'vitest'; -import Requests from './Requests'; import Client from '../Client'; +import Requests from './Requests'; import axios from 'axios'; +import { expect, expectTypeOf, test, vi } from 'vitest'; test('Requests', async () => { const client = new Client(process.env.HYPIXEL_KEY ?? ''); diff --git a/src/Private/Requests.ts b/src/Private/Requests.ts index 5a588d66..c9c55776 100644 --- a/src/Private/Requests.ts +++ b/src/Private/Requests.ts @@ -1,7 +1,7 @@ const BASE_URL = 'https://api.hypixel.net/v2'; -import isUUID from '../utils/isUUID'; import Client from '../Client'; import axios from 'axios'; +import isUUID from '../utils/isUUID'; export interface RequestOptions { raw?: boolean; diff --git a/src/Private/Updater.test.ts b/src/Private/Updater.test.ts index f055a7a8..de70ef45 100644 --- a/src/Private/Updater.test.ts +++ b/src/Private/Updater.test.ts @@ -1,8 +1,8 @@ -import { expect, expectTypeOf, test, vi } from 'vitest'; -import { version } from '../../package.json'; -import Updater from './Updater'; import Client from '../Client'; +import Updater from './Updater'; import axios from 'axios'; +import { expect, expectTypeOf, test, vi } from 'vitest'; +import { version } from '../../package.json'; test('Updater', () => { const client = new Client(process.env.HYPIXEL_KEY ?? ''); diff --git a/src/Private/Updater.ts b/src/Private/Updater.ts index 971028dc..2c695b13 100644 --- a/src/Private/Updater.ts +++ b/src/Private/Updater.ts @@ -1,7 +1,7 @@ /* eslint-disable no-console */ -import { version } from '../../package.json'; import Client from '../Client'; import axios from 'axios'; +import { version } from '../../package.json'; class Updater { readonly client: Client; diff --git a/src/structures/GameCounts.ts b/src/structures/GameCounts.ts index 9d2b2e78..f91d2223 100644 --- a/src/structures/GameCounts.ts +++ b/src/structures/GameCounts.ts @@ -1,5 +1,5 @@ -import { recursive, removeSnakeCaseString } from '../utils/removeSnakeCase'; import Constants from '../utils/Constants'; +import { recursive, removeSnakeCaseString } from '../utils/removeSnakeCase'; class GameCounts { playerCount: number; diff --git a/src/structures/Guild/Guild.ts b/src/structures/Guild/Guild.ts index 1e5bb77f..db004fe5 100644 --- a/src/structures/Guild/Guild.ts +++ b/src/structures/Guild/Guild.ts @@ -1,8 +1,8 @@ -import { calculateExpHistory, ExpHistory, getGuildLevel, members, ranks, totalWeeklyGexp } from '../../utils/Guild'; -import GuildMember from './GuildMember'; -import GuildRank from './GuildRank'; import Color from '../Color'; import Game from '../Game'; +import GuildMember from './GuildMember'; +import GuildRank from './GuildRank'; +import { ExpHistory, calculateExpHistory, getGuildLevel, members, ranks, totalWeeklyGexp } from '../../utils/Guild'; class Guild { id: string; diff --git a/src/structures/MiniGames/Arcade.ts b/src/structures/MiniGames/Arcade.ts index d6d4d271..9030c70a 100644 --- a/src/structures/MiniGames/Arcade.ts +++ b/src/structures/MiniGames/Arcade.ts @@ -1,7 +1,7 @@ // IMPORTANT : a lot of the properties from the API seem to be nonsense -import { removeSnakeCaseString } from '../../utils/removeSnakeCase'; -import { weekAB, monthAB } from '../../utils/oscillation'; import divide from '../../utils/divide'; +import { monthAB, weekAB } from '../../utils/oscillation'; +import { removeSnakeCaseString } from '../../utils/removeSnakeCase'; function parseZombiesKills(data: Record): Record { const matches = Array.from(Object.keys(data)) .map((x) => x.match(/^([A-Za-z]+)_zombie_kills_zombies$/)) diff --git a/src/structures/MiniGames/Duels.ts b/src/structures/MiniGames/Duels.ts index c052b26c..16659381 100644 --- a/src/structures/MiniGames/Duels.ts +++ b/src/structures/MiniGames/Duels.ts @@ -1,6 +1,6 @@ import Constants from '../../utils/Constants'; -import romanize from '../../utils/romanize'; import divide from '../../utils/divide'; +import romanize from '../../utils/romanize'; function getTitle(data: Record, mode: string): string { for (const div of Constants.duelsDivisions.slice().reverse()) { diff --git a/src/structures/MiniGames/Pit.ts b/src/structures/MiniGames/Pit.ts index e7b8cc8b..979b6588 100644 --- a/src/structures/MiniGames/Pit.ts +++ b/src/structures/MiniGames/Pit.ts @@ -1,7 +1,7 @@ -import { decode } from '../../utils/SkyblockUtils'; -import PitInventoryItem from './PitInventoryItem'; import Constants from '../../utils/Constants'; +import PitInventoryItem from './PitInventoryItem'; import divide from '../../utils/divide'; +import { decode } from '../../utils/SkyblockUtils'; export interface PitArmor { helmet: PitInventoryItem | null; diff --git a/src/structures/MiniGames/SkyWars.ts b/src/structures/MiniGames/SkyWars.ts index 271dcadc..6b0d7a1c 100644 --- a/src/structures/MiniGames/SkyWars.ts +++ b/src/structures/MiniGames/SkyWars.ts @@ -1,5 +1,5 @@ -import { removeSnakeCaseString } from '../../utils/removeSnakeCase'; import divide from '../../utils/divide'; +import { removeSnakeCaseString } from '../../utils/removeSnakeCase'; export type SkyWarsPrestige = | 'Iron' diff --git a/src/structures/Player.ts b/src/structures/Player.ts index 00ace2a3..2df9aade 100644 --- a/src/structures/Player.ts +++ b/src/structures/Player.ts @@ -1,33 +1,33 @@ -import { getPlayerLevel, getRank, getSocialMedia, parseClaimedRewards, playerLevelProgress } from '../utils/Player'; +import Arcade from './MiniGames/Arcade'; +import ArenaBrawl from './MiniGames/ArenaBrawl'; +import BedWars from './MiniGames/BedWars'; import BlitzSurvivalGames from './MiniGames/BlitzSurvivalGames'; -import TurboKartRacers from './MiniGames/TurboKartRacers'; -import MurderMystery from './MiniGames/MurderMystery'; -import { recursive } from '../utils/removeSnakeCase'; -import CopsAndCrims from './MiniGames/CopsAndCrims'; import BuildBattle from './MiniGames/BuildBattle'; -import SmashHeroes from './MiniGames/SmashHeroes'; -import PlayerCosmetics from './PlayerCosmetics'; -import Quakecraft from './MiniGames/Quakecraft'; -import ArenaBrawl from './MiniGames/ArenaBrawl'; +import Color from './Color'; +import CopsAndCrims from './MiniGames/CopsAndCrims'; +import Duels from './MiniGames/Duels'; +import Game from './Game'; +import Guild from './Guild/Guild'; +import House from './House'; import MegaWalls from './MiniGames/MegaWalls'; +import MurderMystery from './MiniGames/MurderMystery'; import Paintball from './MiniGames/Paintball'; +import Pit from './MiniGames/Pit'; +import PlayerCosmetics from './PlayerCosmetics'; +import Quakecraft from './MiniGames/Quakecraft'; +import RecentGame from './RecentGame'; +import SkyWars from './MiniGames/SkyWars'; +import SmashHeroes from './MiniGames/SmashHeroes'; import SpeedUHC from './MiniGames/SpeedUHC'; import TNTGames from './MiniGames/TNTGames'; +import TurboKartRacers from './MiniGames/TurboKartRacers'; +import UHC from './MiniGames/UHC'; import VampireZ from './MiniGames/VampireZ'; +import Walls from './MiniGames/Walls'; import Warlords from './MiniGames/Warlords'; import WoolWars from './MiniGames/WoolWars'; -import SkyWars from './MiniGames/SkyWars'; -import BedWars from './MiniGames/BedWars'; -import Arcade from './MiniGames/Arcade'; -import Walls from './MiniGames/Walls'; -import Duels from './MiniGames/Duels'; -import RecentGame from './RecentGame'; -import UHC from './MiniGames/UHC'; -import Pit from './MiniGames/Pit'; -import Guild from './Guild/Guild'; -import Color from './Color'; -import Game from './Game'; -import House from './House'; +import { getPlayerLevel, getRank, getSocialMedia, parseClaimedRewards, playerLevelProgress } from '../utils/Player'; +import { recursive } from '../utils/removeSnakeCase'; export interface LevelProgress { xpToNext: number; diff --git a/src/structures/PlayerCosmetics.ts b/src/structures/PlayerCosmetics.ts index fd9a7dd2..fc2fc32a 100644 --- a/src/structures/PlayerCosmetics.ts +++ b/src/structures/PlayerCosmetics.ts @@ -1,6 +1,6 @@ /* eslint-disable no-underscore-dangle */ -import { removeSnakeCaseString } from '../utils/removeSnakeCase'; import Pets from './Pets'; +import { removeSnakeCaseString } from '../utils/removeSnakeCase'; class PlayerCosmetics { allCosmetics: string[]; diff --git a/src/structures/SkyBlock/Auctions/Auction.ts b/src/structures/SkyBlock/Auctions/Auction.ts index cec5ca96..83def53f 100644 --- a/src/structures/SkyBlock/Auctions/Auction.ts +++ b/src/structures/SkyBlock/Auctions/Auction.ts @@ -1,6 +1,6 @@ -import { SkyblockRarity } from '../../../utils/SkyblockUtils'; import BaseAuction from './BaseAuction'; import Bid from './Bid'; +import { SkyblockRarity } from '../../../utils/SkyblockUtils'; class Auction extends BaseAuction { coop: string[]; diff --git a/src/structures/SkyBlock/SkyblockGarden.ts b/src/structures/SkyBlock/SkyblockGarden.ts index 4ecc63e8..95d058f2 100644 --- a/src/structures/SkyBlock/SkyblockGarden.ts +++ b/src/structures/SkyBlock/SkyblockGarden.ts @@ -1,4 +1,4 @@ -import { getLevelByXp, SkyblockSkillLevel } from '../../utils/SkyblockUtils'; +import { SkyblockSkillLevel, getLevelByXp } from '../../utils/SkyblockUtils'; export interface SkyblockGardenVisitorServed { total: number; diff --git a/src/structures/SkyBlock/SkyblockMember.ts b/src/structures/SkyBlock/SkyblockMember.ts index 32963675..f2f85d0f 100644 --- a/src/structures/SkyBlock/SkyblockMember.ts +++ b/src/structures/SkyBlock/SkyblockMember.ts @@ -1,30 +1,30 @@ +import Constants from '../../utils/Constants'; +import SkyblockGarden from './SkyblockGarden'; +import SkyblockInventoryItem from './SkyblockInventoryItem'; +import SkyblockMuseum from './SkyblockMuseum'; +import SkyblockPet from './SkyblockPet'; +import { NetworthResult, getNetworth } from 'skyhelper-networth'; import { SkyblockMemberChocolateFactoryData, - SkyblockMemberTrophyFishRank, - SkyblockMemberJacobData, SkyblockMemberDungeons, - SkyblockMemberSlayer, + SkyblockMemberJacobData, SkyblockMemberSkills, + SkyblockMemberSlayer, SkyblockMemberStats, - getChocolateFactory, + SkyblockMemberTrophyFishRank, SkyblockSkillLevel, - getTrophyFishRank, + decode, getBestiaryLevel, - getMemberStats, + getChocolateFactory, + getDungeons, getJacobData, getLevelByXp, - getDungeons, + getMemberStats, getPetLevel, getSkills, getSlayer, - decode + getTrophyFishRank } from '../../utils/SkyblockUtils'; -import { getNetworth, NetworthResult } from 'skyhelper-networth'; -import SkyblockInventoryItem from './SkyblockInventoryItem'; -import Constants from '../../utils/Constants'; -import SkyblockGarden from './SkyblockGarden'; -import SkyblockMuseum from './SkyblockMuseum'; -import SkyblockPet from './SkyblockPet'; import { createFarmingWeightCalculator } from 'farming-weight'; export interface SkyblockMemberEquipment { diff --git a/src/structures/SkyBlock/SkyblockPet.ts b/src/structures/SkyBlock/SkyblockPet.ts index 635f31d9..e681eca3 100644 --- a/src/structures/SkyBlock/SkyblockPet.ts +++ b/src/structures/SkyBlock/SkyblockPet.ts @@ -1,5 +1,5 @@ -import { SkyblockRarity } from '../../utils/SkyblockUtils'; import Constants from '../../utils/Constants'; +import { SkyblockRarity } from '../../utils/SkyblockUtils'; class SkyblockPet { uuid: string; diff --git a/src/structures/Static/Challenges.ts b/src/structures/Static/Challenges.ts index 3b23d848..8d861657 100644 --- a/src/structures/Static/Challenges.ts +++ b/src/structures/Static/Challenges.ts @@ -1,5 +1,5 @@ -import { StaticGameNames } from '../../typings'; import GameChallenges from './GameChallenges'; +import { StaticGameNames } from '../../typings'; class Challenges { lastUpdatedTimestamp: number; diff --git a/src/structures/Static/GameAchievements.ts b/src/structures/Static/GameAchievements.ts index 01602c81..9cfbb293 100644 --- a/src/structures/Static/GameAchievements.ts +++ b/src/structures/Static/GameAchievements.ts @@ -1,5 +1,5 @@ -import { StaticGameNames } from '../../typings'; import Achievement from './Achievement'; +import { StaticGameNames } from '../../typings'; class GameAchievements { category: StaticGameNames; diff --git a/src/structures/Static/GameQuests.ts b/src/structures/Static/GameQuests.ts index 66848d62..136482e2 100644 --- a/src/structures/Static/GameQuests.ts +++ b/src/structures/Static/GameQuests.ts @@ -1,5 +1,5 @@ -import { StaticGameNames } from '../../typings'; import Quest from './Quest'; +import { StaticGameNames } from '../../typings'; class GameQuests { game: StaticGameNames; diff --git a/src/structures/Static/Quests.ts b/src/structures/Static/Quests.ts index 9ce1ecb3..ff7aaa64 100644 --- a/src/structures/Static/Quests.ts +++ b/src/structures/Static/Quests.ts @@ -1,5 +1,5 @@ -import { StaticGameNames } from '../../typings'; import GameQuests from './GameQuests'; +import { StaticGameNames } from '../../typings'; class Quests { lastUpdatedTimestamp: number; diff --git a/src/typings/index.d.ts b/src/typings/index.d.ts index e9f4edff..f0e01540 100644 --- a/src/typings/index.d.ts +++ b/src/typings/index.d.ts @@ -1,33 +1,33 @@ -import Requests, { RequestOptions } from '../Private/Requests'; -import CacheHandler from '../Private/CacheHandler'; -import { ClientOptions } from '../Client'; -import Updater from '../Private/Updater'; -import Errors from '../Errors'; import Achievements from '../structures/Static/Achievements'; -import House from '../structures/House'; +import Auction from '../structures/SkyBlock/Auctions/Auction'; +import AuctionInfo from '../structures/SkyBlock/Auctions/AuctionInfo'; +import BingoData from '../structures/SkyBlock/Static/BingoData'; import Booster from '../structures/Boosters/Booster'; +import CacheHandler from '../Private/CacheHandler'; import Challenges from '../structures/Static/Challenges'; +import Errors from '../Errors'; +import FireSale from '../structures/SkyBlock/Static/FireSale'; import GameCounts from '../structures/GameCounts'; +import GovernmentData from '../structures/SkyBlock/Static/Government'; import Guild from '../structures/Guild/Guild'; import GuildAchievements from '../structures/Static/GuildAchievements'; +import House from '../structures/House'; import Player from '../structures/Player'; +import Product from '../structures/SkyBlock/Bazzar/Product'; import Quests from '../structures/Static/Quests'; import RecentGame from '../structures/RecentGame'; -import { AuctionRequestOptions, SkyblockRequestOptions } from '../API/API'; -import Auction from '../structures/SkyBlock/Auctions/Auction'; -import { getSkyblockAuctionsOptions } from '../API/getSkyblockAuctions'; -import AuctionInfo from '../structures/SkyBlock/Auctions/AuctionInfo'; -import Product from '../structures/SkyBlock/Bazzar/Product'; -import BingoData from '../structures/SkyBlock/Static/BingoData'; -import FireSale from '../structures/SkyBlock/Static/FireSale'; +import Requests, { RequestOptions } from '../Private/Requests'; import SkyblockGarden from '../structures/SkyBlock/SkyblockGarden'; -import GovernmentData from '../structures/SkyBlock/Static/Government'; import SkyblockMember from '../structures/SkyBlock/SkyblockMember'; import SkyblockMuseum from '../structures/SkyBlock/SkyblockMuseum'; import SkyblockNews from '../structures/SkyBlock/News/SkyblockNews'; import SkyblockProfile from '../structures/SkyBlock/SkyblockProfile'; import Status from '../structures/Status'; +import Updater from '../Private/Updater'; import WatchdogStats from '../structures/Watchdog/Stats'; +import { AuctionRequestOptions, SkyblockRequestOptions } from '../API/API'; +import { ClientOptions } from '../Client'; +import { getSkyblockAuctionsOptions } from '../API/getSkyblockAuctions'; export type StaticGameNames = | 'arcade' diff --git a/src/utils/SkyblockUtils.test.ts b/src/utils/SkyblockUtils.test.ts index a57b3f1f..4eceb393 100644 --- a/src/utils/SkyblockUtils.test.ts +++ b/src/utils/SkyblockUtils.test.ts @@ -1,5 +1,5 @@ -import { getTrophyFishRank } from './SkyblockUtils'; import { expect, test } from 'vitest'; +import { getTrophyFishRank } from './SkyblockUtils'; test('getTrophyFishRank', () => { expect(getTrophyFishRank(1)).toBe('Bronze'); diff --git a/src/utils/SkyblockUtils.ts b/src/utils/SkyblockUtils.ts index 1a0ea6e1..71d3e94b 100644 --- a/src/utils/SkyblockUtils.ts +++ b/src/utils/SkyblockUtils.ts @@ -1,5 +1,5 @@ -import { parse, simplify } from 'prismarine-nbt'; import Constants from './Constants'; +import { parse, simplify } from 'prismarine-nbt'; export type SkyblockRarity = | 'COMMON' diff --git a/src/utils/divide.test.ts b/src/utils/divide.test.ts index 4a1e6f1d..2ab19c0e 100644 --- a/src/utils/divide.test.ts +++ b/src/utils/divide.test.ts @@ -1,5 +1,5 @@ -import { expect, expectTypeOf, test } from 'vitest'; import divide from './divide'; +import { expect, expectTypeOf, test } from 'vitest'; test('Divide', () => { expect(divide(10, 2)).toBe(5); diff --git a/src/utils/isGuildID.test.ts b/src/utils/isGuildID.test.ts index 669d8342..95894d10 100644 --- a/src/utils/isGuildID.test.ts +++ b/src/utils/isGuildID.test.ts @@ -1,5 +1,5 @@ -import { expect, expectTypeOf, test } from 'vitest'; import isGuildID from './isGuildID'; +import { expect, expectTypeOf, test } from 'vitest'; const ids = ['5b8dd8cb0cf24573ab84c9ad', '656618008ea8c9dca6f3668d', '5ba94ed50cf2cc24cf043706']; const idsInvalid = ['invalid', 'hello why are you here?', '']; diff --git a/src/utils/isUUID.test.ts b/src/utils/isUUID.test.ts index a5972674..c44a3d38 100644 --- a/src/utils/isUUID.test.ts +++ b/src/utils/isUUID.test.ts @@ -1,5 +1,5 @@ -import { expect, expectTypeOf, test } from 'vitest'; import isUUID from './isUUID'; +import { expect, expectTypeOf, test } from 'vitest'; const valid = [ '37501e7512b845ab8796e2baf9e9677a', diff --git a/src/utils/romanize.test.ts b/src/utils/romanize.test.ts index cd6976c1..bb9b5306 100644 --- a/src/utils/romanize.test.ts +++ b/src/utils/romanize.test.ts @@ -1,5 +1,5 @@ -import { expect, test } from 'vitest'; import romanize from './romanize'; +import { expect, test } from 'vitest'; test('romanize', () => { expect(romanize('2')).toBe('II');