Skip to content

Commit 2fc7ff1

Browse files
committed
feat(ci): run format locally
1 parent 249bbf0 commit 2fc7ff1

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

.github/workflows/format-lint.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ jobs:
1414
with:
1515
node-version: '20'
1616
- run: npm ci
17-
- run: npm run format:check
17+
- name: Prettier check
18+
run: npm run format:check
19+
- name: Lint the code
20+
run: npm run lint

src/domrobot.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ export class ApiClient {
4343
methodParams: any = {},
4444
clientTransactionId: string = ApiClient.generateClientTransactionId(),
4545
language: string = this.language,
46-
cacheOption?: "no-store" | "reload" | "no-cache" | "force-cache" | "only-if-cached" | "default",
47-
nextjsOptions?: object
46+
cacheOption?: 'no-store' | 'reload' | 'no-cache' | 'force-cache' | 'only-if-cached' | 'default',
47+
nextjsOptions?: object,
4848
): Promise<any> {
4949
if ('clTRID'! in methodParams && clientTransactionId !== null) {
5050
methodParams.clTRID = clientTransactionId;
@@ -66,11 +66,11 @@ export class ApiClient {
6666
'User-Agent': `DomRobot/${ApiClient.CLIENT_VERSION} (Node ${process.version})`,
6767
}),
6868
body: requestBody,
69-
cache: cacheOption ?? "default",
69+
cache: cacheOption ?? 'default',
7070
};
7171

7272
if (nextjsOptions !== undefined) {
73-
fetchOption = {...fetchOption, ...nextjsOptions};
73+
fetchOption = { ...fetchOption, ...nextjsOptions };
7474
}
7575

7676
const response = await fetch(this.apiUrl, fetchOption);
@@ -79,7 +79,7 @@ export class ApiClient {
7979
this.cookie = response.headers.get('set-cookie');
8080
}
8181

82-
const data = await response.json()
82+
const data = await response.json();
8383
if (this.debugMode) {
8484
console.info(`Request (${apiMethod}): ${requestBody}`);
8585
console.info(`Response (${apiMethod}): ${JSON.stringify(data)}`);

0 commit comments

Comments
 (0)