Skip to content

Commit

Permalink
Pretty print .tsc-baseline.json (#19)
Browse files Browse the repository at this point in the history
For better version control diffing
  • Loading branch information
wdoug authored Jun 4, 2024
1 parent 1f3bcf7 commit 89c098a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const writeTypeScriptErrorsToFile = (
map: Map<string, ErrorInfo>,
filepath: string
): void => {
writeFileSync(filepath, JSON.stringify(Object.fromEntries(map)))
writeFileSync(filepath, JSON.stringify(Object.fromEntries(map), null, 2))
}

export const readTypeScriptErrorsFromFile = (
Expand Down
2 changes: 1 addition & 1 deletion tests/util.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this comm
line: 5,
column: 10
}
})
}, null, 2)
)

const errorMap = readTypeScriptErrorsFromFile(filePath)
Expand Down

0 comments on commit 89c098a

Please sign in to comment.