Merge master
This commit is contained in:
commit
796ee40f3b
169 changed files with 35962 additions and 464 deletions
|
@ -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" : ""))
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue