From 044374153793cd5fa6de559cd50ed045bfdd9240 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemek=20Wi=C4=99ch?= Date: Tue, 28 Apr 2026 23:25:40 +0200 Subject: [PATCH] Run prettier on all code --- src/datasource/wikitree.ts | 10 +++++++--- src/datasource/wikitree_api.ts | 7 +++++-- src/datasource/wikitree_transformer.ts | 27 ++++++++++---------------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/datasource/wikitree.ts b/src/datasource/wikitree.ts index 221c7af..788ef79 100644 --- a/src/datasource/wikitree.ts +++ b/src/datasource/wikitree.ts @@ -3,15 +3,19 @@ import {analyticsEvent} from '../util/analytics'; import {TopolaError} from '../util/error'; import {normalizeGedcom, TopolaData} from '../util/gedcom_util'; import {DataSource, DataSourceEnum, SourceSelection} from './data_source'; -import {loadData, PRIVATE_ID_PREFIX} from './wikitree_api'; -import {convertFams, convertIndis, convertPersonNames} from './wikitree_transformer'; import {buildGedcom} from './gedcom_generator'; +import {loadData, PRIVATE_ID_PREFIX} from './wikitree_api'; +import { + convertFams, + convertIndis, + convertPersonNames, +} from './wikitree_transformer'; export {PRIVATE_ID_PREFIX}; /** * Main entrypoint for loading data from WikiTree and transforming it to Topola format. - * + * * @param key The person key to load. * @param intl Intl shape for localization. * @param authcode Optional authentication code. diff --git a/src/datasource/wikitree_api.ts b/src/datasource/wikitree_api.ts index 3653bc8..3591254 100644 --- a/src/datasource/wikitree_api.ts +++ b/src/datasource/wikitree_api.ts @@ -221,12 +221,15 @@ async function getAllDescendants(key: string, handleCors: boolean) { /** * Loads data from the WikiTree API for a given person key. - * + * * @param key The WikiTree profile ID to load. * @param authcode Optional authentication code. * @returns A unique list of WikiTree `Person` records. */ -export async function loadData(key: string, authcode?: string): Promise { +export async function loadData( + key: string, + authcode?: string, +): Promise { // Work around CORS if not in apps.wikitree.com domain. const handleCors = window.location.hostname !== 'apps.wikitree.com'; diff --git a/src/datasource/wikitree_transformer.ts b/src/datasource/wikitree_transformer.ts index 3a26a26..727e3e3 100644 --- a/src/datasource/wikitree_transformer.ts +++ b/src/datasource/wikitree_transformer.ts @@ -1,11 +1,5 @@ import {IntlShape} from 'react-intl'; -import { - DateOrRange, - JsonEvent, - JsonFam, - JsonImage, - JsonIndi, -} from 'topola'; +import {DateOrRange, JsonEvent, JsonFam, JsonImage, JsonIndi} from 'topola'; import {StringUtils} from 'turbocommons-ts'; import {Person} from 'wikitree-js'; import {PRIVATE_ID_PREFIX} from './wikitree_api'; @@ -81,7 +75,7 @@ function getSpouses(people: Person[]) { /** * Converts a list of WikiTree Person records into Topola individual records. - * + * * @param people List of Person records to convert. * @param intl Intl shape for localization. * @returns List of JsonIndi objects. @@ -97,7 +91,7 @@ export function convertIndis(people: Person[], intl: IntlShape): JsonIndi[] { /** * Converts relationships of a list of WikiTree Person records into Topola family records. - * + * * @param people List of Person records to convert. * @returns List of JsonFam objects. */ @@ -251,13 +245,15 @@ function getMarriedName(person: Person) { /** * Resolves the birth, married, and aka names of a WikiTree Person. - * + * * @param person The WikiTree Person to resolve names for. * @returns Object containing birth, married, and aka names. */ -export function convertPersonNames( - person: Person, -): {birth?: string; married?: string; aka?: string} { +export function convertPersonNames(person: Person): { + birth?: string; + married?: string; + aka?: string; +} { const birth = person.LastNameAtBirth !== 'Unknown' ? person.LastNameAtBirth : undefined; const married = getMarriedName(person); @@ -270,10 +266,7 @@ export function convertPersonNames( return {birth, married, aka}; } -function parseDate( - date: string, - dataStatus?: string, -): DateOrRange | undefined { +function parseDate(date: string, dataStatus?: string): DateOrRange | undefined { if (!date) { return undefined; }