-
Notifications
You must be signed in to change notification settings - Fork 178
/
.flowconfig
76 lines (59 loc) · 2.92 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
[ignore]
<PROJECT_ROOT>/packages/fbt/lib/.*
<PROJECT_ROOT>/packages/fbt/dist/.*
<PROJECT_ROOT>/packages/react-native-fbt/.*
.*/@babel/types/lib/index.js.flow
.*/packages/babel-plugin-fbt/dist/.*
[include]
node_modules
[libs]
; node_modules/@babel/types/lib/index.js.flow
flow-types/libdef
flow-types/nonfb/libdef
[lints]
[options]
name=flow/fbt-top-level-repo
module.system=node
module.system.node.resolve_dirname=node_modules
# TODO(T60942430) Set object definitions to be exact by default
# exact_by_default=true
# Force flow to consider `<fbs*>` as the given type
facebook.fbs=Fbs
# Force flow to consider `<fbt*>` as the given type
facebook.fbt=FbtElement
# Map imported internal plugins
module.name_mapper='^babel-plugin-fbt$' -> '<PROJECT_ROOT>/packages/babel-plugin-fbt/src'
module.name_mapper='^\(babel-plugin-fbt\)/dist/\(.*\)$' -> '<PROJECT_ROOT>/packages/\1/src/\2'
# Import 3rd party node modules used by Babel transforms and runtime tests
module.name_mapper='^\(\(invariant\|graceful-fs\|nullthrows\|optimist\|fb-babel-plugin-utils\|@babel\|jest-docblock\)\(/.*\)?\)$' -> '<PROJECT_ROOT>/node_modules/\1'
module.name_mapper='^\(ReactDOMLegacy_DEPRECATED\)$' -> '<PROJECT_ROOT>/node_modules/react-dom'
# Redirect non-FB JS modules to a dedicated folder
module.name_mapper='^\(FBLocaleToLang\|fbtInit\|FbtEnv\|FbtPublic\|FbtTranslations\|GenderConst\|intlInlineMode\|IntlNumberType\|IntlPhonologicalRewrites\|IntlRedundantStops\|IntlVariationResolver\|IntlVariations\|NumberFormatConsts\)$' -> '<PROJECT_ROOT>/runtime/nonfb/\1'
module.name_mapper='^\(cx\|FBLogger\|FBLogMessage\|FbtQTOverrides\|FbtResultGK\|IntlViewerContext\|killswitch\)$' -> '<PROJECT_ROOT>/runtime/nonfb/mocks/\1'
module.name_mapper='^\(DisplayGenderConst\)$' -> '<PROJECT_ROOT>/runtime/shared_deps/\1'
# Redirect public JS modules to a dedicated folder
module.name_mapper='^\(escapeRegex\|fbs\|fbt\|FbtHooks\|FbtHooksImpl\|FbtPureStringResult\|FbtReactUtil\|FbtResultBase\|FbtResult\|FbtRuntimeTypes\|FbtTable\|FbtTableAccessor\|formatNumber\|getFbsResult\|IntlGender\|intlList\|intlNumUtils\|IntlPunctuation\|IntlVariationResolverImpl\|substituteTokens\)$' -> '<PROJECT_ROOT>/runtime/shared/\1'
module.name_mapper='^\(IntlCLDRNumberType[0-9][0-9]\)$' -> '<PROJECT_ROOT>/runtime/nonfb/FbtNumber/\1'
# This Jest mock file is only used for testing, we don't need it on the OSS side
module.name_mapper='^\(FbtNumberType\)$' -> '<PROJECT_ROOT>/runtime/shared/__mocks__/\1'
# Redirect typed JS Modules
module.name_mapper='^\(NumberFormatConfig\)$' -> '<PROJECT_ROOT>/flow-types/typed-js-modules/\1.js.flow'
munge_underscores=true
sharedmemory.hash_table_pow=23
suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
suppress_type=$FlowFixMeEmpty
suppress_type=$FlowExpectedError
enums=true
[strict]
deprecated-type
nonstrict-import
sketchy-null
unclear-type
unsafe-getters-setters
untyped-import
untyped-type-import
[version]
^0.225.0