From 7b033104582cb46224701799de7eaccaabf85f66 Mon Sep 17 00:00:00 2001 From: Bastian Wagner Date: Sat, 22 Aug 2026 20:41:47 +0200 Subject: [PATCH] style: apply eslint --fix reformatting to files this slice touched Lint was intentionally deferred through tasks 1-7 to keep each task's diff scoped. Running it now only reformats line-wrapping in the four shop/seed files this slice already modified; the ~86 pre-existing problems in npcs, travel, the e2e spec and elsewhere are untouched. Co-Authored-By: Claude Opus 5 --- .../migrations/1796000000000-SellableLootBags.ts | 4 +--- apps/api/src/database/seeds/npc-content.ts | 5 +---- .../src/database/seeds/vertical-slice.seed.spec.ts | 11 +++++------ apps/api/src/shops/offer-presentation.spec.ts | 5 ++++- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/apps/api/src/database/migrations/1796000000000-SellableLootBags.ts b/apps/api/src/database/migrations/1796000000000-SellableLootBags.ts index 2c209d0..4463fce 100644 --- a/apps/api/src/database/migrations/1796000000000-SellableLootBags.ts +++ b/apps/api/src/database/migrations/1796000000000-SellableLootBags.ts @@ -56,9 +56,7 @@ export class SellableLootBags1796000000000 implements MigrationInterface { // Partial, because the column each one covers is now nullable and Postgres // treats NULLs as distinct -- a plain unique index over (shop_id, // item_definition_id) would happily accept a hundred bag offers. - await queryRunner.query( - `DROP INDEX "IDX_shop_offers_shop_item"`, - ); + await queryRunner.query(`DROP INDEX "IDX_shop_offers_shop_item"`); await queryRunner.query( `CREATE UNIQUE INDEX "IDX_shop_offers_shop_item" ON "shop_offers" ("shop_id", "item_definition_id") WHERE "item_definition_id" IS NOT NULL`, ); diff --git a/apps/api/src/database/seeds/npc-content.ts b/apps/api/src/database/seeds/npc-content.ts index 6636668..46324c9 100644 --- a/apps/api/src/database/seeds/npc-content.ts +++ b/apps/api/src/database/seeds/npc-content.ts @@ -9,10 +9,7 @@ import type { DialogueResponseContent, } from '../../npcs/npc.types'; import { ITEM_IDS } from './item.constants'; -import { - BASIC_HIDE_BAG_ID, - BASIC_TROPHY_POUCH_ID, -} from './loot-bag-content'; +import { BASIC_HIDE_BAG_ID, BASIC_TROPHY_POUCH_ID } from './loot-bag-content'; import { BORDER_GUARD_FACTION_ID } from './reputation-content'; export const BORIN_NPC_ID = 'b0000000-0000-4000-8000-000000000001'; diff --git a/apps/api/src/database/seeds/vertical-slice.seed.spec.ts b/apps/api/src/database/seeds/vertical-slice.seed.spec.ts index 3f19478..9d797b3 100644 --- a/apps/api/src/database/seeds/vertical-slice.seed.spec.ts +++ b/apps/api/src/database/seeds/vertical-slice.seed.spec.ts @@ -910,9 +910,7 @@ describe('seedVisibleVerticalSlice', () => { const gated = SHOP_OFFERS.filter((offer) => offer.conditions.length > 0); expect(gated).toHaveLength(3); - expect( - gated.map((offer) => offer.conditions[0].type).sort(), - ).toEqual([ + expect(gated.map((offer) => offer.conditions[0].type).sort()).toEqual([ GameConditionType.REGION_REPUTATION, GameConditionType.REGION_REPUTATION, GameConditionType.WORLD_RENOWN, @@ -944,9 +942,10 @@ describe('seedVisibleVerticalSlice', () => { it('gives every offer exactly one target', async () => { for (const offer of SHOP_OFFERS) { - const targets = [offer.itemDefinitionId, offer.lootBagDefinitionId].filter( - (target) => target !== null, - ); + const targets = [ + offer.itemDefinitionId, + offer.lootBagDefinitionId, + ].filter((target) => target !== null); expect(targets).toHaveLength(1); } }); diff --git a/apps/api/src/shops/offer-presentation.spec.ts b/apps/api/src/shops/offer-presentation.spec.ts index 4daafb5..e05383e 100644 --- a/apps/api/src/shops/offer-presentation.spec.ts +++ b/apps/api/src/shops/offer-presentation.spec.ts @@ -175,7 +175,10 @@ describe('describeItemEffect', () => { describe('describeBagEffect', () => { it('states what the bag carries and how much', () => { expect( - describeBagEffect({ capacity: 5, lootCategory: LootCategory.RAIDER_TROPHY }), + describeBagEffect({ + capacity: 5, + lootCategory: LootCategory.RAIDER_TROPHY, + }), ).toBe('Capacity: 5 Raider Trophies'); });