.flowconfig 2.21 KB
Newer Older
Nikolai R Kristiansen's avatar
Nikolai R Kristiansen committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
[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
15 16 17

; Ignore polyfills
.*/Libraries/polyfills/.*
Nikolai R Kristiansen's avatar
Nikolai R Kristiansen committed
18

19 20 21
; Ignore metro
.*/node_modules/metro/.*

Nikolai R Kristiansen's avatar
Nikolai R Kristiansen committed
22 23 24 25
[include]

[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
26
node_modules/react-native/flow/
Nikolai R Kristiansen's avatar
Nikolai R Kristiansen committed
27 28

[options]
Nikolai R Kristiansen's avatar
Nikolai R Kristiansen committed
29 30
emoji=true

31 32 33
esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable

Nikolai R Kristiansen's avatar
Nikolai R Kristiansen committed
34
module.system=haste
35 36 37 38 39 40 41 42 43 44 45 46 47
module.system.haste.use_name_reducers=true
# get basename
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
# strip .js or .js.flow suffix
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
# strip .ios suffix
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
module.system.haste.paths.blacklist=.*/__tests__/.*
module.system.haste.paths.blacklist=.*/__mocks__/.*
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
Nikolai R Kristiansen's avatar
Nikolai R Kristiansen committed
48 49 50 51 52

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'

53 54 55 56 57
module.file_ext=.js
module.file_ext=.jsx
module.file_ext=.json
module.file_ext=.native.js

Nikolai R Kristiansen's avatar
Nikolai R Kristiansen committed
58 59
suppress_type=$FlowIssue
suppress_type=$FlowFixMe
60 61
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
Nikolai R Kristiansen's avatar
Nikolai R Kristiansen committed
62

63 64
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
Nikolai R Kristiansen's avatar
Nikolai R Kristiansen committed
65
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
Nikolai R Kristiansen's avatar
Nikolai R Kristiansen committed
66
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
Nikolai R Kristiansen's avatar
Nikolai R Kristiansen committed
67 68

[version]
69
^0.92.0