Skip to content

Commit c57e3d9

Browse files
committed
Fix { } formatting
1 parent 569a5b0 commit c57e3d9

59 files changed

Lines changed: 229 additions & 212 deletions

Some content is hidden

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

client/src/api/benchmarks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
* API for fetching benchmarks.
33
*/
44

5-
import type {Benchmarks} from "@/types/assays"
5+
import type { Benchmarks } from "@/types/assays"
66
// --- libraries ---
77
import axios from "axios"
88
// --- types ---
9-
import type {AxiosResponse} from "axios"
9+
import type { AxiosResponse } from "axios"
1010

1111
type BenchmarksResponse = AxiosResponse<Benchmarks>
1212

client/src/api/corpora.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22
* API calls for creating, updating, deleting a corpus, and fetching the list of corpora.
33
*/
44

5-
import type {CorpusMetadata, MutableCorpusMetadata, UUID} from "@/types/corpora"
5+
import type {
6+
CorpusMetadata,
7+
MutableCorpusMetadata,
8+
UUID,
9+
} from "@/types/corpora"
610
// --- libraries ---
711
import axios from "axios"
812
// --- types ---
9-
import type {AxiosResponse} from "axios"
13+
import type { AxiosResponse } from "axios"
1014

1115
type CorporaResponse = AxiosResponse<CorpusMetadata[]>
1216
type CorpusResponse = AxiosResponse<CorpusMetadata>

client/src/api/documents.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66
// -- api ---
77
import * as Utils from "@/api/utils"
8-
import type {BlobResponse} from "@/api/utils"
9-
import type {UUID} from "@/types/corpora"
10-
import type {DocumentMetadata} from "@/types/documents"
8+
import type { BlobResponse } from "@/api/utils"
9+
import type { UUID } from "@/types/corpora"
10+
import type { DocumentMetadata } from "@/types/documents"
1111
// --- libraries ---
1212
import axios from "axios"
1313
// --- types ---
14-
import type {AxiosResponse} from "axios"
14+
import type { AxiosResponse } from "axios"
1515

1616
type DocumentsResponse = AxiosResponse<DocumentMetadata[]>
1717

@@ -42,7 +42,7 @@ export function postDocument(
4242
document: FormData,
4343
contentType?: Record<string, string>,
4444
) {
45-
return axios.post(documentsPath(corpus), document, {headers: contentType})
45+
return axios.post(documentsPath(corpus), document, { headers: contentType })
4646
}
4747

4848
/**

client/src/api/evaluation.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
// --- api ---
66
import * as Utils from "@/api/utils"
7-
import type {BlobResponse} from "@/api/utils"
8-
import type {UUID} from "@/types/corpora"
7+
import type { BlobResponse } from "@/api/utils"
8+
import type { UUID } from "@/types/corpora"
99
import type {
1010
ConfusionWrapper,
1111
DistributionWrapper,
@@ -15,7 +15,7 @@ import type {
1515
// --- libraries ---
1616
import axios from "axios"
1717
// --- types ---
18-
import type {AxiosResponse} from "axios"
18+
import type { AxiosResponse } from "axios"
1919

2020
type ConfusionResponse = AxiosResponse<ConfusionWrapper>
2121
type DistributionResponse = AxiosResponse<DistributionWrapper>
@@ -67,7 +67,7 @@ export function getConfusion(
6767
reference: string,
6868
): Promise<ConfusionResponse> {
6969
return axios.get(confusionPath(corpus, hypothesis), {
70-
params: {reference},
70+
params: { reference },
7171
})
7272
}
7373

@@ -82,7 +82,7 @@ export function getMetrics(
8282
hypothesis: string,
8383
reference: string,
8484
): Promise<MetricsResponse> {
85-
return axios.get(metricsPath(corpus, hypothesis), {params: {reference}})
85+
return axios.get(metricsPath(corpus, hypothesis), { params: { reference } })
8686
}
8787

8888
/**
@@ -97,7 +97,7 @@ export function getDownloadEvaluation(
9797
reference: string,
9898
): Promise<BlobResponse> {
9999
return Utils.getBlob(downloadPath(corpus, hypothesis), {
100-
params: {reference},
100+
params: { reference },
101101
})
102102
}
103103

@@ -118,7 +118,7 @@ export function getConfusionSamples(
118118
annotationType: string,
119119
): Promise<BlobResponse> {
120120
return Utils.getBlob(confusionSamplesPath(corpus, hypothesis), {
121-
params: {reference, hypoFilter, refFilter, annotationType},
121+
params: { reference, hypoFilter, refFilter, annotationType },
122122
})
123123
}
124124

@@ -147,7 +147,7 @@ export function getMetricsSamples(
147147
if (group) {
148148
params.group = group
149149
}
150-
return Utils.getBlob(metricsSamplesPath(corpus, hypothesis), {params})
150+
return Utils.getBlob(metricsSamplesPath(corpus, hypothesis), { params })
151151
}
152152

153153
/**
@@ -165,6 +165,6 @@ export function getDocumentLayerComparison(
165165
reference: string,
166166
): Promise<AxiosResponse<TermComparison[]>> {
167167
return axios.get(documentLayerComparisonPath(corpus, job, document), {
168-
params: {reference},
168+
params: { reference },
169169
})
170170
}

client/src/api/export.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
// --- api ---
77
import * as Utils from "@/api/utils"
88
// --- types ---
9-
import type {BlobResponse} from "@/api/utils"
10-
import type {UUID} from "@/types/corpora"
11-
import type {Format} from "@/types/documents"
9+
import type { BlobResponse } from "@/api/utils"
10+
import type { UUID } from "@/types/corpora"
11+
import type { Format } from "@/types/documents"
1212

1313
// --- computed ---
1414
const convertCorpusPath = (

client/src/api/jobs.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
* API calls for getting existing jobs and job layer results, posting and cancelling jobs, and polling job progress.
33
*/
44

5-
import type {UUID} from "@/types/corpora"
6-
import type {Job, Progress} from "@/types/jobs"
5+
import type { UUID } from "@/types/corpora"
6+
import type { Job, Progress } from "@/types/jobs"
77
// --- libraries ---
88
import axios from "axios"
99
// --- types ---
10-
import type {AxiosResponse} from "axios"
10+
import type { AxiosResponse } from "axios"
1111

1212
type JobsResponse = AxiosResponse<Job[]>
1313
type JobResponse = AxiosResponse<Job>
@@ -27,7 +27,7 @@ const jobProgressPath = (corpus: UUID, job: string) =>
2727
* @param corpus UUID of the corpus.
2828
*/
2929
export function getJobs(corpus: UUID): Promise<JobsResponse> {
30-
return axios.get(jobsPath(corpus), {params: {hasResult: false}})
30+
return axios.get(jobsPath(corpus), { params: { hasResult: false } })
3131
}
3232

3333
/**
@@ -59,7 +59,7 @@ export function cancelOrDeleteJob(
5959
job: string,
6060
hard: boolean,
6161
): Promise<ProgressResponse> {
62-
return axios.delete(jobPath(corpus, job), {params: {hard: hard}})
62+
return axios.delete(jobPath(corpus, job), { params: { hard: hard } })
6363
}
6464

6565
/**

client/src/api/taggers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
* API calls for fetching taggers and their health status.
33
*/
44

5-
import type {Tagger, TaggerHealth} from "@/types/taggers"
5+
import type { Tagger, TaggerHealth } from "@/types/taggers"
66
// --- libraries ---
77
import axios from "axios"
88
// --- types ---
9-
import type {AxiosResponse} from "axios"
9+
import type { AxiosResponse } from "axios"
1010

1111
type TaggersResponse = AxiosResponse<Tagger[]>
1212
type TaggerHealthResponse = AxiosResponse<TaggerHealth>

client/src/api/tagset.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
* API calls for fetching tagsets.
33
*/
44

5-
import type {Tagset} from "@/types/tagset"
5+
import type { Tagset } from "@/types/tagset"
66
// --- libraries ---
77
import axios from "axios"
88
// --- types ---
9-
import type {AxiosResponse} from "axios"
9+
import type { AxiosResponse } from "axios"
1010

1111
type TagsetsResponse = AxiosResponse<Tagset[]>
1212

client/src/api/user.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
*/
44

55
// --- types ---
6-
import type {User} from "@/types/user"
6+
import type { User } from "@/types/user"
77
// --- libraries ---
8-
import axios, {type AxiosResponse} from "axios"
8+
import axios, { type AxiosResponse } from "axios"
99

1010
type UserResponse = AxiosResponse<User>
1111

client/src/api/utils.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
* Utils for handling the blobs from some API responses.
33
*/
44

5-
import type {ErrorMessage} from "@/api/api"
6-
import type {AppStore} from "@/stores"
5+
import type { ErrorMessage } from "@/api/api"
6+
import type { AppStore } from "@/stores"
77
// --- libraries ---
88
import axios from "axios"
99
// --- types ---
10-
import type {AxiosError, AxiosRequestConfig, AxiosResponse} from "axios"
11-
import {parse} from "content-disposition"
10+
import type { AxiosError, AxiosRequestConfig, AxiosResponse } from "axios"
11+
import { parse } from "content-disposition"
1212

1313
export type BlobResponse = AxiosResponse<Blob>
1414

@@ -21,7 +21,7 @@ export function getBlob(
2121
path: string,
2222
config?: AxiosRequestConfig,
2323
): Promise<BlobResponse> {
24-
return axios.get(path, {responseType: "blob", ...config})
24+
return axios.get(path, { responseType: "blob", ...config })
2525
}
2626

2727
/**

0 commit comments

Comments
 (0)