From 9e71b6065fed86f6a4eb4253dc11278d58736d43 Mon Sep 17 00:00:00 2001 From: Jaych Su Date: Wed, 16 Aug 2017 16:31:02 -0700 Subject: [PATCH] Make prospective syntax compatible Summary: Can't run `RNTester` app and got the error below: ![image](https://user-images.githubusercontent.com/6890034/29361000-1ae6cfce-82b8-11e7-9522-b827de2712f7.png) Make prospective syntax(trailing commas in function parameter lists and calls, supported in ES8) compatible. If correct, the `RNTester` can be started. Closes https://github.com/facebook/react-native/pull/15510 Differential Revision: D5644673 Pulled By: TheSavior fbshipit-source-id: df34638f37b81f04cea5cf7a25fc7405d4321ea6 --- setupBabel.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setupBabel.js b/setupBabel.js index f87b81703..58b2ce693 100644 --- a/setupBabel.js +++ b/setupBabel.js @@ -28,15 +28,15 @@ function buildRegExps(basePath, dirPaths) { folderPath instanceof RegExp ? new RegExp( `^${escapeRegExp( - path.resolve(basePath, '.').replace(/\\/g, '/'), + path.resolve(basePath, '.').replace(/\\/g, '/') )}/${folderPath.source}`, - folderPath.flags, + folderPath.flags ) : new RegExp( `^${escapeRegExp( - path.resolve(basePath, folderPath).replace(/\\/g, '/'), - )}`, - ), + path.resolve(basePath, folderPath).replace(/\\/g, '/') + )}` + ) ); }