Skip to content

Commit ce9ab1a

Browse files
committed
style: Apply code formatting and fix linting issues
1 parent f77644a commit ce9ab1a

84 files changed

Lines changed: 7397 additions & 5746 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/analytics/history.ts

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
import { dotNetTicksToDate } from '../utils/dotnetTicks';
1+
import { dotNetTicksToDate } from "../utils/dotnetTicks";
22
import {
33
findGrid3Users,
44
Grid3UserPath,
55
readAllGrid3History as readAllGrid3HistoryImpl,
66
readGrid3History as readGrid3HistoryImpl,
77
readGrid3HistoryForUser as readGrid3HistoryForUserImpl,
8-
} from '../processors/gridset/helpers';
8+
} from "../processors/gridset/helpers";
99
import {
1010
findSnapUsers,
1111
readSnapUsage as readSnapUsageImpl,
1212
readSnapUsageForUser as readSnapUsageForUserImpl,
1313
SnapUserInfo,
14-
} from '../processors/snap/helpers';
14+
} from "../processors/snap/helpers";
1515

16-
export type HistorySource = 'Grid' | 'Snap';
16+
export type HistorySource = "Grid" | "Snap";
1717

1818
export interface HistoryOccurrence {
1919
timestamp: Date;
@@ -48,44 +48,47 @@ export { dotNetTicksToDate };
4848
export function readGrid3History(historyDbPath: string): HistoryEntry[] {
4949
return readGrid3HistoryImpl(historyDbPath).map((e) => ({
5050
...e,
51-
source: 'Grid',
51+
source: "Grid",
5252
}));
5353
}
5454

5555
/**
5656
* Read Grid 3 history for a specific user/language combination.
5757
*/
58-
export function readGrid3HistoryForUser(userName: string, langCode?: string): HistoryEntry[] {
58+
export function readGrid3HistoryForUser(
59+
userName: string,
60+
langCode?: string,
61+
): HistoryEntry[] {
5962
return readGrid3HistoryForUserImpl(userName, langCode).map((e) => ({
6063
...e,
61-
source: 'Grid',
64+
source: "Grid",
6265
}));
6366
}
6467

6568
/**
6669
* Read every available Grid 3 history database on the machine.
6770
*/
6871
export function readAllGrid3History(): HistoryEntry[] {
69-
return readAllGrid3HistoryImpl().map((e) => ({ ...e, source: 'Grid' }));
72+
return readAllGrid3HistoryImpl().map((e) => ({ ...e, source: "Grid" }));
7073
}
7174

7275
/**
7376
* Read Snap button usage from a pageset database and tag entries with source.
7477
*/
7578
export function readSnapUsage(pagesetPath: string): HistoryEntry[] {
76-
return readSnapUsageImpl(pagesetPath).map((e) => ({ ...e, source: 'Snap' }));
79+
return readSnapUsageImpl(pagesetPath).map((e) => ({ ...e, source: "Snap" }));
7780
}
7881

7982
/**
8083
* Read Snap usage for a specific user across all discovered pagesets.
8184
*/
8285
export function readSnapUsageForUser(
8386
userId?: string,
84-
packageNamePattern = 'TobiiDynavox'
87+
packageNamePattern = "TobiiDynavox",
8588
): HistoryEntry[] {
8689
return readSnapUsageForUserImpl(userId, packageNamePattern).map((e) => ({
8790
...e,
88-
source: 'Snap',
91+
source: "Snap",
8992
}));
9093
}
9194

@@ -106,6 +109,8 @@ export function listGrid3Users(): Grid3UserPath[] {
106109
*/
107110
export function collectUnifiedHistory(): HistoryEntry[] {
108111
const gridHistory = readAllGrid3History();
109-
const snapHistory = findSnapUsers().flatMap((u) => readSnapUsageForUser(u.userId));
112+
const snapHistory = findSnapUsers().flatMap((u) =>
113+
readSnapUsageForUser(u.userId),
114+
);
110115
return [...gridHistory, ...snapHistory];
111116
}

0 commit comments

Comments
 (0)