# desktop VERSION. TODO flow supports multiple config files now
# TODO: work on splitting out the .js.flow files into types.js.flow files
# To test the future desktop version uncomment lines w/ D1 in front
[ignore]
# Soon we'll start running flow from desktop/ios/android perspective and have multiple flow config files
#D1 .*/*[.]android.js
#D1 .*/*[.]ios.js
#D1 .*/*[.]native.js
# Will start to ignore js.flow files soon
#.*/*[.].js.flow
#.*/*[.]desktop.js
<PROJECT_ROOT>/react-native/android/app/.*
<PROJECT_ROOT>/react/node_modules/.*
<PROJECT_ROOT>/../protocol/.*
<PROJECT_ROOT>/desktop/build/.*
<PROJECT_ROOT>/desktop/release/.*
<PROJECT_ROOT>/react-native/react-native-contacts
<PROJECT_ROOT>/node_modules/immutable/type-definitions/tests
<PROJECT_ROOT>/node_modules/react-native/Libraries/EventEmitter/__mocks__
<PROJECT_ROOT>/node_modules/react-navigation/src/views/CardStack/CardStackTransitioner.js
<PROJECT_ROOT>/node_modules/electron-packager
.*memoize-one.*
<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation.js
.*[.]gif$
.*[.]png$

[include]

[libs]
./libs/flow-interface.js.flow
./libs/electron_vx.x.x.js.flow
./flow-typed

[options]
include_warnings=true
munge_underscores=true
esproposal.class_static_fields=enable
esproposal.class_instance_fields=enable
experimental.const_params=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\)$' -> '<PROJECT_ROOT>/__mocks__/global-image-stub.js'

module.system=haste

module.system.haste.use_name_reducers=true
# strip .js or .js.flow suffix
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
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/.*
# strip .mobile 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.name_reducers='^\(.*\)\.desktop\.js$' -> '\1'
#D1 module.file_ext=.js
#D1 module.file_ext=.desktop.js
# module.file_ext=.ios.js
# module.file_ext=.android.js
# module.file_ext=.native.js

suppress_type=$FlowIssue
suppress_type=$ForceType
suppress_type=$FlowFixMe
suppress_type=$FixMe

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]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue
suppress_comment=\\(.\\|\n\\)*\\$ForceType

[lints]
all=warn
sketchy-null-bool=off
sketchy-null-string=off
sketchy-null-mixed=off
sketchy-null-number=off
unclear-type=off
untyped-import=off
deprecated-type=error
sketchy-number-and=off

[strict]
nonstrict-import
unclear-type
unsafe-getters-setters
untyped-import
untyped-type-import

[version]
^0.81.0
