mirror of
https://github.com/status-im/react-native.git
synced 2025-01-15 12:05:06 +00:00
343c5a97a0
Summary: `metro-bundler` looks for `.native.js` files ([see here](https://github.com/facebook/metro-bundler/blob/master/packages/metro-bundler/src/node-haste/DependencyGraph/ModuleResolution.js#L458)). Packages such as `react-navigation` rely on this functionality ([see here](https://github.com/react-community/react-navigation/blob/master/src/PlatformHelpers.native.js)). This PR makes it so you can `react-native init`, `yarn add react-navigation`, and `flow` successfully! 1. `react-native init` 2. `yarn add react-navigation` 3. `flow` [CLI] [MINOR] [Flow] - Tell template app .flowconfig to look for .native.js files Closes https://github.com/facebook/react-native/pull/16816 Differential Revision: D6445363 Pulled By: shergin fbshipit-source-id: c0ce7ed27a8a3291deaa09d98e822362f93929c8
53 lines
1.5 KiB
Plaintext
53 lines
1.5 KiB
Plaintext
[ignore]
|
|
; We fork some components by platform
|
|
.*/*[.]android.js
|
|
|
|
; Ignore "BUCK" generated dirs
|
|
<PROJECT_ROOT>/\.buckd/
|
|
|
|
; Ignore unexpected extra "@providesModule"
|
|
.*/node_modules/.*/node_modules/fbjs/.*
|
|
|
|
; Ignore duplicate module providers
|
|
; For RN Apps installed via npm, "Libraries" folder is inside
|
|
; "node_modules/react-native" but in the source repo it is in the root
|
|
.*/Libraries/react-native/React.js
|
|
|
|
; Ignore polyfills
|
|
.*/Libraries/polyfills/.*
|
|
|
|
[include]
|
|
|
|
[libs]
|
|
node_modules/react-native/Libraries/react-native/react-native-interface.js
|
|
node_modules/react-native/flow/
|
|
|
|
[options]
|
|
emoji=true
|
|
|
|
module.system=haste
|
|
|
|
munge_underscores=true
|
|
|
|
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
|
|
|
|
module.file_ext=.js
|
|
module.file_ext=.jsx
|
|
module.file_ext=.json
|
|
module.file_ext=.native.js
|
|
|
|
suppress_type=$FlowIssue
|
|
suppress_type=$FlowFixMe
|
|
suppress_type=$FlowFixMeProps
|
|
suppress_type=$FlowFixMeState
|
|
|
|
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-9]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
|
|
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-9]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
|
|
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
|
|
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
|
|
|
|
unsafe.enable_getters_and_setters=true
|
|
|
|
[version]
|
|
^0.59.0
|