Merge master

This commit is contained in:
Pieter Vander Vennet 2022-04-01 12:56:51 +02:00
commit 796ee40f3b
169 changed files with 35962 additions and 464 deletions

View file

@ -302,11 +302,11 @@ function sortKeys(o: object): object{
* Formats the specified file, helps to prevent merge conflicts
* */
function formatFile(path) {
let contents = JSON.parse(readFileSync(path, "utf8"))
const original = readFileSync(path, "utf8")
let contents = JSON.parse(original)
contents = sortKeys(contents)
writeFileSync(path, JSON.stringify(contents, null, " "))
const endsWithNewline = original.endsWith("\n")
writeFileSync(path, JSON.stringify(contents, null, " ") + (endsWithNewline ? "\n" : ""))
}
/**