From fdce93845514a781d01da8cc2c944dbb571f3012 Mon Sep 17 00:00:00 2001 From: gengjiawen Date: Mon, 2 Jul 2018 10:41:17 -0700 Subject: [PATCH] fix missing prettier file (#20001) Summary: fix missing prettier file pass all current ci. https://github.com/facebook/react-native/pull/19987 [GENERAL] [INTERNAL] [TOOL] - fix missing prettier file. Closes https://github.com/facebook/react-native/pull/20001 Differential Revision: D8714374 Pulled By: hramos fbshipit-source-id: acdcb5d84c56d26c55f6262a0a98aefe786de8cb --- Libraries/polyfills/babelHelpers.js | 3 +-- local-cli/runAndroid/runAndroid.js | 13 +++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Libraries/polyfills/babelHelpers.js b/Libraries/polyfills/babelHelpers.js index 991b4fbfbdb..f831deaa842 100644 --- a/Libraries/polyfills/babelHelpers.js +++ b/Libraries/polyfills/babelHelpers.js @@ -197,8 +197,7 @@ babelHelpers.get = function _get(target, property, receiver = target) { } return desc.value; -} - +}; // ### inherits ### diff --git a/local-cli/runAndroid/runAndroid.js b/local-cli/runAndroid/runAndroid.js index cd21b6ac29c..6835c97bcb0 100644 --- a/local-cli/runAndroid/runAndroid.js +++ b/local-cli/runAndroid/runAndroid.js @@ -354,9 +354,7 @@ function startServerInNewWindow(port) { const scriptFile = isWindows ? 'launchPackager.bat' : 'launchPackager.command'; - const packagerEnvFilename = isWindows - ? '.packager.bat' - : '.packager.env'; + const packagerEnvFilename = isWindows ? '.packager.bat' : '.packager.env'; const portExportContent = isWindows ? `set RCT_METRO_PORT=${port}` : `export RCT_METRO_PORT=${port}`; @@ -373,11 +371,14 @@ function startServerInNewWindow(port) { '..', '..', 'scripts', - packagerEnvFilename + packagerEnvFilename, ); - + // ensure we overwrite file by passing the 'w' flag - fs.writeFileSync(packagerEnvFile, portExportContent, {encoding: 'utf8', flag: 'w'}); + fs.writeFileSync(packagerEnvFile, portExportContent, { + encoding: 'utf8', + flag: 'w', + }); if (process.platform === 'darwin') { if (terminal) {