Skip to content

Commit

Permalink
Make prospective syntax compatible
Browse files Browse the repository at this point in the history
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 #15510

Differential Revision: D5644673

Pulled By: TheSavior

fbshipit-source-id: df34638f37b81f04cea5cf7a25fc7405d4321ea6
  • Loading branch information
jaychsu authored and facebook-github-bot committed Aug 16, 2017
1 parent f69638b commit 9e71b60
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions setupBabel.js
Expand Up @@ -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, '/')
)}`
)
);
}

Expand Down

0 comments on commit 9e71b60

Please sign in to comment.