Skip to content

Commit 28b9fb7

Browse files
committed
chore: add flowconfig
1 parent 77b5796 commit 28b9fb7

File tree

3 files changed

+619
-634
lines changed

3 files changed

+619
-634
lines changed

.flowconfig

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
[ignore]
2+
; We fork some components by platform
3+
.*/*[.]android.js
4+
5+
; Ignore "BUCK" generated dirs
6+
<PROJECT_ROOT>/\.buckd/
7+
8+
; Ignore polyfills
9+
node_modules/react-native/Libraries/polyfills/.*
10+
11+
; These should not be required directly
12+
; require from fbjs/lib instead: require('fbjs/lib/warning')
13+
node_modules/warning/.*
14+
15+
; Flow doesn't support platforms
16+
.*/Libraries/Utilities/LoadingView.js
17+
18+
; Ignore example folder
19+
.*/example/.*
20+
21+
22+
[untyped]
23+
.*/node_modules/@react-native-community/cli/.*/.*
24+
25+
[include]
26+
27+
[libs]
28+
node_modules/react-native/Libraries/react-native/react-native-interface.js
29+
node_modules/react-native/flow/
30+
31+
[options]
32+
emoji=true
33+
34+
esproposal.optional_chaining=enable
35+
esproposal.nullish_coalescing=enable
36+
37+
module.file_ext=.js
38+
module.file_ext=.json
39+
module.file_ext=.ios.js
40+
41+
munge_underscores=true
42+
43+
module.name_mapper='^react-native$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation'
44+
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
45+
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\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'
46+
47+
suppress_type=$FlowIssue
48+
suppress_type=$FlowFixMe
49+
suppress_type=$FlowFixMeProps
50+
suppress_type=$FlowFixMeState
51+
52+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
53+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
54+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
55+
56+
[lints]
57+
sketchy-null-number=warn
58+
sketchy-null-mixed=warn
59+
sketchy-number=warn
60+
untyped-type-import=warn
61+
nonstrict-import=warn
62+
deprecated-type=warn
63+
unsafe-getters-setters=warn
64+
inexact-spread=warn
65+
unnecessary-invariant=warn
66+
signature-verification-failure=warn
67+
deprecated-utility=error
68+
69+
[strict]
70+
deprecated-type
71+
nonstrict-import
72+
sketchy-null
73+
unclear-type
74+
unsafe-getters-setters
75+
untyped-import
76+
untyped-type-import
77+
78+
[version]
79+
^0.105.0

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
"babel-plugin-module-resolver": "^3.2.0",
2727
"eslint": "^6.8.0",
2828
"eslint-plugin-prettier": "^3.1.2",
29-
"flow-bin": "^0.86.0",
29+
"flow-bin": "0.105.2",
3030
"jest": "24.7.1",
3131
"metro-react-native-babel-preset": "0.53.1",
3232
"prettier": "^1.19.1",
3333
"react": "16.8.3",
34-
"react-native": "0.59.5",
34+
"react-native": "^0.61.5",
3535
"react-test-renderer": "16.8.3"
3636
},
3737
"jest": {

0 commit comments

Comments
 (0)