Skip to content

Commit

Permalink
Update prettier.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: aa243fca393cd1a24a1f5d16e774e0ad646d4e6e
  • Loading branch information
cpojer committed Dec 4, 2024
1 parent 186b441 commit cd7313f
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 29 deletions.
2 changes: 1 addition & 1 deletion apollo/lib/decodeGameActionResponse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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),
};
}
5 changes: 2 additions & 3 deletions art/Sprites.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ type MaybePaletteSwapParameters = [
...DropFirstInTuple<PaletteSwapParameters>,
];

type Canvas = ReturnType<PaletteSwapFn> extends ReadonlyMap<unknown, infer V>
? V
: never;
type Canvas =
ReturnType<PaletteSwapFn> extends ReadonlyMap<unknown, infer V> ? V : never;

type CanvasToURLFn = (canvas: Canvas, name: string) => Promise<string>;

Expand Down
8 changes: 5 additions & 3 deletions athena/info/Skill.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand All @@ -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 = (
Expand Down
4 changes: 2 additions & 2 deletions dionysus/DionysusAlpha.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
19 changes: 9 additions & 10 deletions hera/editor/panels/EffectsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
9 changes: 6 additions & 3 deletions hera/ui/SkillDescription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,9 @@ const getExtraDescription = (skill: Skill, color: BaseColor) => {
<fbt:param name="raisedCounterAttack">
{RaisedCounterAttack * 100}
</fbt:param>% as effective as initial attacks instead of
<fbt:param name="counterAttack">{CounterAttack * 100}</fbt:param>%.
<fbt:param name="counterAttack">
{CounterAttack * 100}
</fbt:param>%.
</fbt>
);
case Skill.UnlockZombie:
Expand Down Expand Up @@ -703,8 +705,9 @@ const getExtraDescription = (skill: Skill, color: BaseColor) => {
/>
</fbt:param>{' '}
units heal
<fbt:param name="value">{VampireSkillHeal}</fbt:param> health points
at the beginning of their turn.
<fbt:param name="value">
{VampireSkillHeal}
</fbt:param> health points at the beginning of their turn.
</fbt>
);
case Skill.Shield:
Expand Down
8 changes: 2 additions & 6 deletions i18n/AvailableLanguages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<infer K, unknown> ? K : never;

export default AvailableLanguages;
2 changes: 1 addition & 1 deletion ui/AudioPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit cd7313f

Please sign in to comment.