From cd7313f5e9fcdec7b8b0ec800f9680b2862126b1 Mon Sep 17 00:00:00 2001 From: cpojer Date: Wed, 4 Dec 2024 13:29:25 +0900 Subject: [PATCH] Update prettier. GitOrigin-RevId: aa243fca393cd1a24a1f5d16e774e0ad646d4e6e --- apollo/lib/decodeGameActionResponse.tsx | 2 +- art/Sprites.tsx | 5 ++--- athena/info/Skill.tsx | 8 +++++--- dionysus/DionysusAlpha.tsx | 4 ++-- hera/editor/panels/EffectsPanel.tsx | 19 +++++++++---------- hera/ui/SkillDescription.tsx | 9 ++++++--- i18n/AvailableLanguages.tsx | 8 ++------ ui/AudioPlayer.tsx | 2 +- 8 files changed, 28 insertions(+), 29 deletions(-) diff --git a/apollo/lib/decodeGameActionResponse.tsx b/apollo/lib/decodeGameActionResponse.tsx index 567976b0..bee1194e 100644 --- a/apollo/lib/decodeGameActionResponse.tsx +++ b/apollo/lib/decodeGameActionResponse.tsx @@ -39,6 +39,6 @@ export default function decodeGameActionResponse( units: self[2] && decodeUnits(self[2]), } : null, - timeout: response[2] === null ? null : response[2] ?? undefined, + timeout: response[2] === null ? null : (response[2] ?? undefined), }; } diff --git a/art/Sprites.tsx b/art/Sprites.tsx index 98624728..07a78386 100644 --- a/art/Sprites.tsx +++ b/art/Sprites.tsx @@ -24,9 +24,8 @@ type MaybePaletteSwapParameters = [ ...DropFirstInTuple, ]; -type Canvas = ReturnType extends ReadonlyMap - ? V - : never; +type Canvas = + ReturnType extends ReadonlyMap ? V : never; type CanvasToURLFn = (canvas: Canvas, name: string) => Promise; diff --git a/athena/info/Skill.tsx b/athena/info/Skill.tsx index e0526b7f..fea291b6 100644 --- a/athena/info/Skill.tsx +++ b/athena/info/Skill.tsx @@ -677,7 +677,7 @@ const getMovementStatusEffect = ( entity: Readonly<{ type: EntityType }> | UnitInfo, ) => movementStatusEffects && isUnitInfo(entity) - ? movementStatusEffects.get(skill)?.get(entity.movementType) ?? 0 + ? (movementStatusEffects.get(skill)?.get(entity.movementType) ?? 0) : 0; const getTileStatusEffect = ( @@ -687,8 +687,10 @@ const getTileStatusEffect = ( tile: TileInfo | null, ) => tile && tileStatusEffects && isUnitInfo(entity) - ? tileStatusEffects.get(skill)?.get(tile.group)?.get(entity.movementType) ?? - 0 + ? (tileStatusEffects + .get(skill) + ?.get(tile.group) + ?.get(entity.movementType) ?? 0) : 0; const someOneSkill = ( diff --git a/dionysus/DionysusAlpha.tsx b/dionysus/DionysusAlpha.tsx index dad4fe05..24774640 100644 --- a/dionysus/DionysusAlpha.tsx +++ b/dionysus/DionysusAlpha.tsx @@ -367,8 +367,8 @@ export default class DionysusAlpha extends BaseAI { if (from && unit) { const rescuable = getRescuableVectors(map, from); - const to = [...rescuable].find( - (vector) => map.units.get(vector)?.isBeingRescuedBy(unit.player), + const to = [...rescuable].find((vector) => + map.units.get(vector)?.isBeingRescuedBy(unit.player), ); if (to) { this.tryAttacking(); diff --git a/hera/editor/panels/EffectsPanel.tsx b/hera/editor/panels/EffectsPanel.tsx index 930a70a4..1d132b18 100644 --- a/hera/editor/panels/EffectsPanel.tsx +++ b/hera/editor/panels/EffectsPanel.tsx @@ -77,16 +77,15 @@ export default function EffectsPanel({ ...(effects.get('OptionalObjective') || []), ]); return new Set( - [...effectList].flatMap( - ({ conditions }) => - conditions - ?.map((condition) => - condition.type === 'GameEnd' || - condition.type === 'OptionalObjective' - ? condition.value - : null, - ) - .filter(isPresent), + [...effectList].flatMap(({ conditions }) => + conditions + ?.map((condition) => + condition.type === 'GameEnd' || + condition.type === 'OptionalObjective' + ? condition.value + : null, + ) + .filter(isPresent), ), ); }, [effects]); diff --git a/hera/ui/SkillDescription.tsx b/hera/ui/SkillDescription.tsx index 96dbffcd..26733b1f 100644 --- a/hera/ui/SkillDescription.tsx +++ b/hera/ui/SkillDescription.tsx @@ -670,7 +670,9 @@ const getExtraDescription = (skill: Skill, color: BaseColor) => { {RaisedCounterAttack * 100} % as effective as initial attacks instead of - {CounterAttack * 100}%. + + {CounterAttack * 100} + %. ); case Skill.UnlockZombie: @@ -703,8 +705,9 @@ const getExtraDescription = (skill: Skill, color: BaseColor) => { /> {' '} units heal - {VampireSkillHeal} health points - at the beginning of their turn. + + {VampireSkillHeal} + health points at the beginning of their turn. ); case Skill.Shield: diff --git a/i18n/AvailableLanguages.tsx b/i18n/AvailableLanguages.tsx index 2cc4d476..7cab3788 100644 --- a/i18n/AvailableLanguages.tsx +++ b/i18n/AvailableLanguages.tsx @@ -12,11 +12,7 @@ const AvailableLanguages = new Map([ ['zh_CN', '简体中文 (Simplified Chinese)'], ] as const); -export type AvailableLanguage = typeof AvailableLanguages extends Map< - infer K, - unknown -> - ? K - : never; +export type AvailableLanguage = + typeof AvailableLanguages extends Map ? K : never; export default AvailableLanguages; diff --git a/ui/AudioPlayer.tsx b/ui/AudioPlayer.tsx index 11bd154a..b52f0bc1 100644 --- a/ui/AudioPlayer.tsx +++ b/ui/AudioPlayer.tsx @@ -174,7 +174,7 @@ class AudioPlayer { } getVolume(type: AudioVolumeType) { - return type === 'master' ? Howler.volume() : getVolume(type) ?? 1; + return type === 'master' ? Howler.volume() : (getVolume(type) ?? 1); } setVolume(type: AudioVolumeType, volume: number) {