Skip to content

Commit

Permalink
Fix the way to write the correct JSON on file
Browse files Browse the repository at this point in the history
Signed-off-by: Airton Zanon <[email protected]>
  • Loading branch information
airtonzanon committed Aug 26, 2019
1 parent 2679a6b commit ee286d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,7 @@ function fixJson(filePath, formatted) {
return;
}

fs.writeFile(filePath, formatted, (err) => {
if (err) {
process.exit(1);
}
});
fs.writeFileSync(filePath, formatted);
console.log(filePath + " - has been fixed");
hasErrors = false;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"code",
"style"
],
"version": "0.1.0",
"version": "0.1.1",
"preferGlobal": true,
"repository": {
"type": "git",
Expand Down

0 comments on commit ee286d1

Please sign in to comment.