Skip to content

Commit ecd17b4

Browse files
authored
Formatting changes (#60)
1 parent 2665f2e commit ecd17b4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/lib/utils/json.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import { getErrorMessage } from "./get-error-message";
66
export function readTypedJsonSync<T>(filePath: string) {
77
try {
88
const rawContent = fs.readFileSync(filePath, "utf-8");
9-
const data = JSON.parse(stripJsonComments(rawContent, { trailingCommas: true })) as T;
9+
const data = JSON.parse(
10+
stripJsonComments(rawContent, { trailingCommas: true })
11+
) as T;
1012
return data;
1113
} catch (err) {
1214
throw new Error(
@@ -18,7 +20,9 @@ export function readTypedJsonSync<T>(filePath: string) {
1820
export async function readTypedJson<T>(filePath: string) {
1921
try {
2022
const rawContent = await fs.readFile(filePath, "utf-8");
21-
const data = JSON.parse(stripJsonComments(rawContent, { trailingCommas: true })) as T;
23+
const data = JSON.parse(
24+
stripJsonComments(rawContent, { trailingCommas: true })
25+
) as T;
2226
return data;
2327
} catch (err) {
2428
throw new Error(

0 commit comments

Comments
 (0)