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
This commit is contained in:
Jaych Su 2017-08-16 16:31:02 -07:00 committed by Facebook Github Bot
parent f69638b56f
commit 9e71b6065f
1 changed files with 5 additions and 5 deletions

View File

@ -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, '/')
)}`
)
);
}