Skip to content

Commit 18ae2cf

Browse files
committed
Lint fix
1 parent 6da2bce commit 18ae2cf

File tree

2 files changed

+26
-21
lines changed

2 files changed

+26
-21
lines changed

index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,9 @@ const generateCommand = defineCommand({
285285
},
286286
"default-request-params": {
287287
type: "string",
288-
description:
289-
"request parameters for each API request",
288+
description: "request parameters for each API request",
290289
default: codeGenBaseConfig.defaultRequestParams,
291-
}
290+
},
292291
},
293292
run: async ({ args }) => {
294293
const customConfig = await loadConfig<GenerateApiParams>({

tests/spec/defaultRequestParams/basic.test.ts

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,15 @@ describe("basic", async () => {
2626

2727
const files = await fs.readdir(tmpdir);
2828

29-
await Promise.all(files.map(async file => {
30-
const content = await fs.readFile(path.join(tmpdir, file), {
31-
encoding: "utf8",
32-
});
29+
await Promise.all(
30+
files.map(async (file) => {
31+
const content = await fs.readFile(path.join(tmpdir, file), {
32+
encoding: "utf8",
33+
});
3334

34-
expect(content).toMatchSnapshot(file);
35-
}));
35+
expect(content).toMatchSnapshot(file);
36+
}),
37+
);
3638
});
3739
test("defaultRequestParams with empty default", async () => {
3840
await generateApi({
@@ -45,13 +47,15 @@ describe("basic", async () => {
4547

4648
const files = await fs.readdir(tmpdir);
4749

48-
await Promise.all(files.map(async file => {
49-
const content = await fs.readFile(path.join(tmpdir, file), {
50-
encoding: "utf8",
51-
});
50+
await Promise.all(
51+
files.map(async (file) => {
52+
const content = await fs.readFile(path.join(tmpdir, file), {
53+
encoding: "utf8",
54+
});
5255

53-
expect(content).toMatchSnapshot(file);
54-
}));
56+
expect(content).toMatchSnapshot(file);
57+
}),
58+
);
5559
});
5660
test("defaultRequestParams modular", async () => {
5761
await generateApi({
@@ -64,12 +68,14 @@ describe("basic", async () => {
6468
});
6569

6670
const files = await fs.readdir(tmpdir);
67-
await Promise.all(files.map(async file => {
68-
const content = await fs.readFile(path.join(tmpdir, file), {
69-
encoding: "utf8",
70-
});
71+
await Promise.all(
72+
files.map(async (file) => {
73+
const content = await fs.readFile(path.join(tmpdir, file), {
74+
encoding: "utf8",
75+
});
7176

72-
expect(content).toMatchSnapshot(file);
73-
}));
77+
expect(content).toMatchSnapshot(file);
78+
}),
79+
);
7480
});
7581
});

0 commit comments

Comments
 (0)