Skip to content

Commit ee286d1

Browse files
committed
Fix the way to write the correct JSON on file
Signed-off-by: Airton Zanon <me@airton.dev>
1 parent 2679a6b commit ee286d1

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

lib/cli.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,7 @@ function fixJson(filePath, formatted) {
4646
return;
4747
}
4848

49-
fs.writeFile(filePath, formatted, (err) => {
50-
if (err) {
51-
process.exit(1);
52-
}
53-
});
49+
fs.writeFileSync(filePath, formatted);
5450
console.log(filePath + " - has been fixed");
5551
hasErrors = false;
5652
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"code",
99
"style"
1010
],
11-
"version": "0.1.0",
11+
"version": "0.1.1",
1212
"preferGlobal": true,
1313
"repository": {
1414
"type": "git",

0 commit comments

Comments
 (0)