-
-
Notifications
You must be signed in to change notification settings - Fork 655
/
.flowconfig
127 lines (98 loc) · 3.7 KB
/
.flowconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
[ignore]
; ### From React Native's template app:
; We fork some components by platform
.*/*[.]android.js
; Ignore polyfills
node_modules/react-native/Libraries/polyfills/.*
; Flow doesn't support platforms
.*/Libraries/Utilities/LoadingView.js
; ### Custom ignores
.*/ios/Pods/*
.*/node_modules/mitt/src/.*
.*/node_modules/match-at/lib/.*
.*/node_modules/eslint-plugin-jsx-a11y/.*
; https://github.com/facebook/flow/issues/2364
.*/node_modules/resolve/test/resolver/malformed_package_json/.*
.*/node_modules/react-native-tab-view/.*
.*/node_modules/react-native-safe-area/.*
.*/node_modules/flow-coverage-report/.*
.*/node_modules/@snyk/.*
; As of v4.1.1, this package only has TypeScript. That's fine as far as
; running the code goes -- Metro transpiles it -- but this line causes Flow
; to stop looking for types in that TypeScript, and then go and look in our
; libdef.
.*/node_modules/react-native-image-picker/.*
[untyped]
.*/node_modules/@react-native-community/cli/.*/.*
; Our libdef is more complete, as of 2021-08.
.*/node_modules/@react-native-async-storage/async-storage.*
[include]
; Effectively this line warns Flow that this path might be a symlink
; (because the developer might be using `yarn link` to have this point into
; their zulip.git worktree), and it should watch/inotify at the target.
node_modules/@zulip/shared/
node_modules/zulip-markdown-parser/
; Add more as needed! See also metro.config.js and docs/howto/yarn-link.md .
[libs]
node_modules/react-native/interface.js
node_modules/react-native/flow/
; If the following files are not explicitly named, Flow ignores them in favor of
; their autogenerated versions in flow-typed/npm. (Contrast commit 6219e5a23,
; where the opposite behavior is exhibited!)
flow-typed/@sentry/react-native_v1.x.x.js
flow-typed/react-native-url-polyfill_vx.x.x.js
flow-typed/expo-screen-orientation_vx.x.x.js
; Explicitly name these so that Flow sees them instead of their
; counterparts in node_modules/react-native:
flow-typed/jest_v27.x.x.js
[strict]
; These apply only to files where `@flow strict` is enabled.
; See https://flow.org/en/docs/strict/ .
; from RN
deprecated-type
nonstrict-import
sketchy-null
unclear-type
unsafe-getters-setters
untyped-import
untyped-type-import
[lints]
; from RN
sketchy-null-number=warn
sketchy-null-mixed=warn
untyped-type-import=warn
nonstrict-import=warn
deprecated-type=warn
unsafe-getters-setters=warn
unnecessary-invariant=warn
; ours
sketchy-number=error
unnecessary-optional-chain=warn
implicit-inexact-object=error
[options]
emoji=true
# The main warning is "Unused suppression comment".
include_warnings=true
munge_underscores=true
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
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'
# This causes Flow to find our `types/foo/bar.js.flow`, if one exists,
# when looking at an import from `foo/bar`. (The `[^.]` is so Flow doesn't
# try to apply this to relative imports.)
module.name_mapper='^\([^.].*\)$' -> '<PROJECT_ROOT>/types/\0'
suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
module.file_ext=.js
module.file_ext=.json
module.file_ext=.ios.js
; This is the future of Flow; see
; https://medium.com/flow-type/how-to-upgrade-to-exact-by-default-object-type-syntax-7aa44b4d08ab.
; But we should anticipate that not all our third-party code acts sensibly
; when this is turned on (e.g., see dfa52ab46). As of turning it on, though,
; we're error-free!
exact_by_default=true
enums=true
[version]
^0.175.1