From 85dc8eb1183ca54f19176f2df67bbaa198c7887e Mon Sep 17 00:00:00 2001 From: Andrey Okonetchnikov Date: Tue, 10 Jan 2017 21:45:04 +0100 Subject: [PATCH] style: Run prettier on the source code --- bin/prettier.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/prettier.js b/bin/prettier.js index dc87d76a..6e00d0b2 100755 --- a/bin/prettier.js +++ b/bin/prettier.js @@ -13,7 +13,7 @@ const argv = minimist(process.argv.slice(2), { }); const filenames = argv["_"]; -const write = argv['write']; +const write = argv["write"]; if (!filenames.length) { console.log( @@ -40,16 +40,16 @@ filenames.forEach(filename => { } const output = jscodefmt.format(input, { - printWidth: argv['print-width'], - tabWidth: argv['tab-width'], - bracketSpacing: argv['bracket-spacing'], - useFlowParser: argv['flow-parser'], + printWidth: argv["print-width"], + tabWidth: argv["tab-width"], + bracketSpacing: argv["bracket-spacing"], + useFlowParser: argv["flow-parser"], singleQuote: argv["single-quote"], trailingComma: argv["trailing-comma"] }); if (write) { - fs.writeFile(filename, output, "utf8", (err) => { + fs.writeFile(filename, output, "utf8", err => { if (err) { console.error("Unable to write file: " + filename + "\n" + err); // Don't exit the process if one file failed @@ -59,5 +59,5 @@ filenames.forEach(filename => { } else { console.log(output); } - }) -}) + }); +});