react-native/local-cli/templates/HelloWorld
Héctor Ramos f4d627c8fa Fix failure due to missing Metro flow types
Summary:
Fixes the Flow failure due to an undefined Ast type.

Before:

```
 $ npm run flow -- check

> react-native@1000.0.0 flow /Users/hramos/git/react-native
> flow "check"

Error: local-cli/__tests__/fs-mock-test.js:27
 27:   beforeEach(() => {
       ^^^^^^^^^^ beforeEach. Could not resolve name

Error: local-cli/__tests__/fs-mock-test.js:53
 53:       expect(content).toEqual('beep');
           ^^^^^^ expect. Could not resolve name

Error: local-cli/__tests__/fs-mock-test.js:88
 88:         expect(content).toEqual('hello, world!');
             ^^^^^^ expect. Could not resolve name

Error: local-cli/__tests__/fs-mock-test.js:100
100:       expect(content).toEqual('hello, world!');
           ^^^^^^ expect. Could not resolve name

Error: node_modules/metro/src/Bundler/util.js.flow:46
 46: ): Ast {
        ^^^ Ast. Could not resolve name

Error: node_modules/metro/src/ModuleGraph/worker/collect-dependencies.js.flow:283
283: const xp = (module.exports = (ast: Ast) =>
                                        ^^^ Ast. Could not resolve name

Error: node_modules/metro/src/assetTransformer.js.flow:29
 29: ): Promise<{ast: Ast}> {
                      ^^^ Ast. Could not resolve name
```

After

```
$ npm run flow -- check

> react-native@1000.0.0 flow /Users/hramos/git/react-native
> flow "check"

Error: local-cli/__tests__/fs-mock-test.js:27
 27:   beforeEach(() => {
       ^^^^^^^^^^ beforeEach. Could not resolve name

Error: local-cli/__tests__/fs-mock-test.js:53
 53:       expect(content).toEqual('beep');
           ^^^^^^ expect. Could not resolve name

Error: local-cli/__tests__/fs-mock-test.js:88
 88:         expect(content).toEqual('hello, world!');
             ^^^^^^ expect. Could not resolve name

Error: local-cli/__tests__/fs-mock-test.js:100
100:       expect(content).toEqual('hello, world!');
           ^^^^^^ expect. Could not resolve name
```

[ GENERAL ] [ BUGFIX] [ .flowconfig ] - Have Flow ignore Metro node_nodules
Closes https://github.com/facebook/react-native/pull/17187

Differential Revision: D6572303

Pulled By: hramos

fbshipit-source-id: aa256b9725970fcc2a6da6578c83e7c0875e3cfd
2017-12-14 15:19:08 -08:00
..
__tests__ Move HelloWorld template to a single index.js entry point 2017-08-03 14:02:43 -07:00
android Move HelloWorld template to a single index.js entry point 2017-08-03 14:02:43 -07:00
ios Fix tvOS compile issues; enable TVEventHandler in Modal (fix #15389) 2017-11-09 13:54:54 -08:00
App.js Upgrade fbsource/xplat/js to Flow v0.53.0 2017-08-17 18:45:01 -07:00
_babelrc Fix indent for .babelrc in HelloWorld template 2017-03-10 13:45:58 -08:00
_buckconfig Fix handling of dotfiles in 'react-native init' and 'react-native upgrade' 2016-11-21 12:58:29 -08:00
_flowconfig Fix failure due to missing Metro flow types 2017-12-14 15:19:08 -08:00
_gitattributes Allow git to merge pbxproj files 2016-11-22 17:58:29 -08:00
_gitignore Update default .gitignore to work with fastlane setups in sub-folders 2017-08-04 15:48:14 -07:00
_watchmanconfig Fix handling of dotfiles in 'react-native init' and 'react-native upgrade' 2016-11-21 12:58:29 -08:00
app.json Eject CLI command to re-create native folders 2017-02-03 12:58:46 -08:00
index.js Move HelloWorld template to a single index.js entry point 2017-08-03 14:02:43 -07:00