Skip to content

Commit

Permalink
[Project] Update @putstack/eslint-config-typescript to 3.11.0
Browse files Browse the repository at this point in the history
This includes requring sorting of types, functions and more - has no impact on consumers of the library
  • Loading branch information
Pewtro committed Nov 20, 2024
1 parent e3a47aa commit 36584d8
Show file tree
Hide file tree
Showing 107 changed files with 2,582 additions and 2,647 deletions.
11 changes: 11 additions & 0 deletions .changeset/soft-frogs-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@blizzard-api/classic-wow': patch
'@blizzard-api/client': patch
'@blizzard-api/core': patch
'@blizzard-api/sc2': patch
'@blizzard-api/wow': patch
'@blizzard-api/d3': patch
'@blizzard-api/hs': patch
---

Sort types, functions and more - has no impact on consumers of the library
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,22 @@
"hearthstone"
],
"devDependencies": {
"@changesets/cli": "2.27.9",
"@putstack/eslint-config-typescript": "3.10.0",
"@changesets/cli": "2.27.10",
"@putstack/eslint-config-typescript": "3.11.0",
"@putstack/prettier-config": "1.4.3",
"@types/node": "22.9.0",
"@vitest/coverage-v8": "2.1.4",
"@vitest/ui": "2.1.4",
"eslint": "9.14.0",
"husky": "9.1.6",
"@types/node": "22.9.1",
"@vitest/coverage-v8": "2.1.5",
"@vitest/ui": "2.1.5",
"eslint": "9.15.0",
"husky": "9.1.7",
"lint-staged": "15.2.10",
"npm-run-all2": "7.0.1",
"prettier": "3.3.3",
"tsup": "8.3.5",
"turbo": "2.2.3",
"turbo": "2.3.0",
"typescript": "5.6.3",
"typescript-eslint": "8.13.0",
"vitest": "2.1.4",
"typescript-eslint": "8.15.0",
"vitest": "2.1.5",
"zod": "3.23.8"
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/classic-wow/src/auction-house/auction-house.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { AuctionHouseIndexResponse, AuctionsResponse } from './types';
* @returns The auction house index. See {@link AuctionHouseIndexResponse}.
*/
export function auctionHouseIndex(
namespace: Extract<BlizzardNamespaces, 'dynamic-classic' | 'dynamic-classic1x'>,
namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>,
connectedRealmId: number,
): Resource<AuctionHouseIndexResponse> {
return {
Expand All @@ -29,7 +29,7 @@ export function auctionHouseIndex(
* @returns The auction house data. See {@link AuctionsResponse}.
*/
export function auctions(
namespace: Extract<BlizzardNamespaces, 'dynamic-classic' | 'dynamic-classic1x'>,
namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>,
connectedRealmId: number,
auctionHouseId: number,
): Resource<AuctionsResponse> {
Expand Down
2 changes: 1 addition & 1 deletion packages/classic-wow/src/auction-house/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export interface AuctionHouseIndexResponse extends ResponseBase {
auctions: Array<NameIdKey>;
}

export interface AuctionsResponse extends ResponseBase, NameId {
export interface AuctionsResponse extends NameId, ResponseBase {
auctions: Array<Auction>;
connected_realm: { href: string };
}
Expand Down
30 changes: 15 additions & 15 deletions packages/classic-wow/src/connected-realm/connected-realm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,42 @@ import type {
ConnectedRealmSearchResponseItem,
} from './types';

/**
* Returns an index of connected realms.
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
* @returns The connected realm index. See {@link ConnectedRealmIndexResponse}.
*/
export function connectedRealmIndex(
namespace: Extract<BlizzardNamespaces, 'dynamic-classic' | 'dynamic-classic1x'>,
): Resource<ConnectedRealmIndexResponse> {
return {
namespace,
path: `${base}/connected-realm/index`,
};
}
/**
* Returns a connected realm by ID.
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
* @param connectedRealmId The connected realm ID.
* @returns The connected realm. See {@link ConnectedRealmResponse}.
*/
export function connectedRealm(
namespace: Extract<BlizzardNamespaces, 'dynamic-classic' | 'dynamic-classic1x'>,
namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>,
connectedRealmId: number,
): Resource<ConnectedRealmResponse> {
return {
namespace,
path: `${base}/connected-realm/${connectedRealmId}`,
};
}
/**
* Returns an index of connected realms.
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
* @returns The connected realm index. See {@link ConnectedRealmIndexResponse}.
*/
export function connectedRealmIndex(
namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>,
): Resource<ConnectedRealmIndexResponse> {
return {
namespace,
path: `${base}/connected-realm/index`,
};
}
/**
* Performs a search of connected realms.
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
* @param options The search parameters. See {@link ConnectedRealmSearchParameters}.
* @returns The search results. See {@link SearchResponse} & {@link ConnectedRealmSearchResponseItem}.
*/
export function connectedRealmSearch(
namespace: Extract<BlizzardNamespaces, 'dynamic-classic' | 'dynamic-classic1x'>,
namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>,
options: ConnectedRealmSearchParameters,
): Resource<SearchResponse<ConnectedRealmSearchResponseItem>, ConnectedRealmSearchParameters> {
return {
Expand Down
54 changes: 27 additions & 27 deletions packages/classic-wow/src/creature/creature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import type {
* @returns The creature. See {@link CreatureResponse}.
*/
export function creature(
namespace: Extract<BlizzardNamespaces, 'static-classic' | 'static-classic1x'>,
namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>,
creatureId: number,
): Resource<CreatureResponse> {
return {
Expand All @@ -34,7 +34,7 @@ export function creature(
* @returns The creature display media. See {@link CreatureDisplayMediaResponse}.
*/
export function creatureDisplayMedia(
namespace: Extract<BlizzardNamespaces, 'static-classic' | 'static-classic1x'>,
namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>,
creatureDisplayId: number,
): Resource<CreatureDisplayMediaResponse> {
return {
Expand All @@ -49,7 +49,7 @@ export function creatureDisplayMedia(
* @returns The creature family. See {@link CreatureFamilyResponse}.
*/
export function creatureFamily(
namespace: Extract<BlizzardNamespaces, 'static-classic' | 'static-classic1x'>,
namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>,
creatureFamilyId: number,
): Resource<CreatureFamilyResponse> {
return {
Expand All @@ -63,7 +63,7 @@ export function creatureFamily(
* @returns The creature family index. See {@link CreatureFamilyIndexResponse}.
*/
export function creatureFamilyIndex(
namespace: Extract<BlizzardNamespaces, 'static-classic' | 'static-classic1x'>,
namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>,
): Resource<CreatureFamilyIndexResponse> {
return {
namespace,
Expand All @@ -77,22 +77,42 @@ export function creatureFamilyIndex(
* @returns The creature family media. See {@link CreatureFamilyMediaResponse}.
*/
export function creatureFamilyMedia(
namespace: Extract<BlizzardNamespaces, 'static-classic' | 'static-classic1x'>,
namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>,
creatureFamilyId: number,
): Resource<CreatureFamilyMediaResponse> {
return {
namespace,
path: `${mediaBase}/creature-family/${creatureFamilyId}`,
};
}
/**
* Performs a search of creatures.
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
* @param options The creature search parameters. See {@link CreatureSearchParameters}.
* @returns The creature search results. See {@link SearchResponse} & {@link CreatureSearchResponseItem}.
*/
export function creatureSearch(
namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>,
options: CreatureSearchParameters,
): Resource<SearchResponse<CreatureSearchResponseItem>, Omit<CreatureSearchParameters, 'locale' | 'name'>> {
return {
namespace,
parameters: {
_page: options._page,
[`name.${options.locale}`]: options.name,
orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby,
},
path: `${searchBase}/creature`,
};
}
/**
* Returns a creature type by ID.
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
* @param creatureTypeId The creature type ID.
* @returns The creature type. See {@link CreatureTypeResponse}.
*/
export function creatureType(
namespace: Extract<BlizzardNamespaces, 'static-classic' | 'static-classic1x'>,
namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>,
creatureTypeId: number,
): Resource<CreatureTypeResponse> {
return {
Expand All @@ -106,30 +126,10 @@ export function creatureType(
* @returns The creature type index. See {@link CreatureTypeIndexResponse}.
*/
export function creatureTypeIndex(
namespace: Extract<BlizzardNamespaces, 'static-classic' | 'static-classic1x'>,
namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>,
): Resource<CreatureTypeIndexResponse> {
return {
namespace,
path: `${base}/creature-type/index`,
};
}
/**
* Performs a search of creatures.
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
* @param options The creature search parameters. See {@link CreatureSearchParameters}.
* @returns The creature search results. See {@link SearchResponse} & {@link CreatureSearchResponseItem}.
*/
export function creatureSearch(
namespace: Extract<BlizzardNamespaces, 'static-classic' | 'static-classic1x'>,
options: CreatureSearchParameters,
): Resource<SearchResponse<CreatureSearchResponseItem>, Omit<CreatureSearchParameters, 'locale' | 'name'>> {
return {
namespace,
parameters: {
_page: options._page,
[`name.${options.locale}`]: options.name,
orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby,
},
path: `${searchBase}/creature`,
};
}
30 changes: 15 additions & 15 deletions packages/classic-wow/src/guild-crest/guild-crest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,42 @@ import type { BlizzardNamespaces, Resource } from '@blizzard-api/core';
import { base, mediaBase } from '../../../wow/src/base';
import type { GuildCrestBorderEmblemResponse, GuildCrestComponentsIndexResponse } from './types';

/**
* Returns an index of guild crest media.
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
* @returns The guild crest components index. See {@link GuildCrestComponentsIndexResponse}.
*/
export function guildCrestComponentsIndex(
namespace: Extract<BlizzardNamespaces, 'static-classic' | 'static-classic1x'>,
): Resource<GuildCrestComponentsIndexResponse> {
return {
namespace,
path: `${base}/guild-crest/index`,
};
}
/**
* Returns media for a guild crest border by ID.
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
* @param borderId The guild crest border ID.
* @returns The guild crest border. See {@link GuildCrestBorderEmblemResponse}.
*/
export function guildCrestBorder(
namespace: Extract<BlizzardNamespaces, 'static-classic' | 'static-classic1x'>,
namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>,
borderId: number,
): Resource<GuildCrestBorderEmblemResponse> {
return {
namespace,
path: `${mediaBase}/guild-crest/border/${borderId}`,
};
}
/**
* Returns an index of guild crest media.
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
* @returns The guild crest components index. See {@link GuildCrestComponentsIndexResponse}.
*/
export function guildCrestComponentsIndex(
namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>,
): Resource<GuildCrestComponentsIndexResponse> {
return {
namespace,
path: `${base}/guild-crest/index`,
};
}
/**
* Returns media for a guild crest emblem by ID.
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
* @param emblemId The guild crest emblem ID.
* @returns The guild crest emblem. See {@link GuildCrestBorderEmblemResponse}.
*/
export function guildCrestEmblem(
namespace: Extract<BlizzardNamespaces, 'static-classic' | 'static-classic1x'>,
namespace: Extract<BlizzardNamespaces, 'static-classic1x' | 'static-classic'>,
emblemId: number,
): Resource<GuildCrestBorderEmblemResponse> {
return {
Expand Down
2 changes: 1 addition & 1 deletion packages/classic-wow/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const classicWow = {
region,
regionIndex,
};
export { classicWow as default, classicWow };
export { classicWow, classicWow as default };

//Auction House
export * from './auction-house/auction-house';
Expand Down
Loading

0 comments on commit 36584d8

Please sign in to comment.