Skip to content

Commit 7a339ee

Browse files
committed
chore: update scripts
1 parent 6456465 commit 7a339ee

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

scripts/ignores.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414

1515
import fs from "fs/promises";
1616

17-
export const ignores = await fs.readFile(".gitignore", "utf-8").then((v) => {
18-
return v
19-
.split("\n")
20-
.map((v) => v.trim())
21-
.filter((v) => !v.startsWith("#") && !v.startsWith("!"))
22-
.map((v) => v.replace(/^\//, ""))
23-
.filter((v) => v !== "");
24-
});
17+
export const ignores = await fs
18+
.readFile(".gitignore", "utf-8")
19+
.then((v) => {
20+
return v
21+
.split("\n")
22+
.map((v) => v.trim())
23+
.filter((v) => !v.startsWith("#") && !v.startsWith("!"))
24+
.map((v) => v.replace(/^\//, ""))
25+
.filter((v) => v !== "");
26+
});

scripts/libs/json.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
/* eslint-disable @susisu/safe-typescript/no-type-assertion */
1+
/* eslint-disable @typescript-eslint/no-unsafe-return */
22
import fs from "fs/promises";
33
import type { JsonValue } from "type-fest";
44

5-
export function readJsonFile(path: string) {
5+
export function readJsonFile(path: string): Promise<JsonValue> {
66
return fs.readFile(path, "utf-8")
7-
.then((v) => JSON.parse(v) as JsonValue);
7+
.then((v) => JSON.parse(v));
88
}
99

1010
export function writeJsonFile(

0 commit comments

Comments
 (0)