Skip to content

Commit

Permalink
fix: add trailing line feed to formatted JSON (#623)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alicia Lopez committed Apr 25, 2022
1 parent b31f17e commit a6ea773
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function writeFile(file, content) {
};

export function writeJson(file, obj) {
writeFile(file, JSON.stringify(obj, null, 2));
writeFile(file, `${JSON.stringify(obj, null, 2)}\n`);
};

export function readFile(file) {
Expand Down

0 comments on commit a6ea773

Please sign in to comment.