From a9792ac4c8ee04f9832a99e95e1afebbb568d230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ramos?= Date: Thu, 2 Aug 2018 16:02:51 -0700 Subject: [PATCH] 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 --- .flowconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.flowconfig b/.flowconfig index b402919a374..9c7134c3659 100644 --- a/.flowconfig +++ b/.flowconfig @@ -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