mirror of
https://github.com/status-im/react-native.git
synced 2025-01-13 19:15:05 +00:00
Enable optional_chaining in open source Flow config
Summary: There's a couple of Flow errors in open source, following D9081343: ``` yarn run v1.6.0 $ flow check Error --------------------------------------------------------------------- Libraries/Components/Switch/Switch.js:139:31 Experimental optional chaining (`?.`) usage. Optional chaining is an active early-stage feature proposal that may change. You may opt in to using it anyway by putting `esproposal.optional_chaining=enable` into the `[options]` section of your `.flowconfig`. 139| let _trackColorForFalse = trackColor?.false; ^^^^^^^^^^^^^^^^^ Error --------------------------------------------------------------------- Libraries/Components/Switch/Switch.js:140:30 Experimental optional chaining (`?.`) usage. Optional chaining is an active early-stage feature proposal that may change. You may opt in to using it anyway by putting `esproposal.optional_chaining=enable` into the `[options]` section of your `.flowconfig`. 140| let _trackColorForTrue = trackColor?.true; ^^^^^^^^^^^^^^^^ ``` See https://circleci.com/gh/facebook/react-native/48701 We have a different Flow config for open source, .github.flowconfig, that needs to be updated to ensure Flow passes in oss. Reviewed By: TheSavior Differential Revision: D9141134 fbshipit-source-id: 7b546ef4c9a91bdd66472242f38a6fc8bcf86364
This commit is contained in:
parent
407e033b34
commit
a9792ac4c8
@ -40,6 +40,8 @@ flow-github/
|
||||
[options]
|
||||
emoji=true
|
||||
|
||||
esproposal.optional_chaining=enable
|
||||
|
||||
module.system=haste
|
||||
module.system.haste.use_name_reducers=true
|
||||
# keep the following in sync with server/haste/hasteImpl.js
|
||||
|
Loading…
x
Reference in New Issue
Block a user