Skip to content

Commit

Permalink
[flow] Flip default of as_const config
Browse files Browse the repository at this point in the history
Summary:
Given that we are going to flip `experimental.natural_inference.exports.primitive_const` soon and `as const` is the most effective way to make the code compliant with the new config, it's time to flip default for as const.

Changelog: [internal]

Reviewed By: panagosg7

Differential Revision:
D66789208

------------------------------------------------------------------------
(from 80a6d49f8da02c545fed3374a3dc43916431fb6f)

fbshipit-source-id: c696e31056c57b0c0efcf7aaa3a200f0777a51ae
  • Loading branch information
SamChou19815 authored and facebook-github-bot committed Dec 5, 2024
1 parent e880881 commit 56ebaf0
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion src/commands/commandUtils.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1378,7 +1378,7 @@ let make_options
|> min Sys_utils.nbr_procs;
opt_suppress_types = FlowConfig.suppress_types flowconfig;
opt_max_literal_length = FlowConfig.max_literal_length flowconfig;
opt_as_const = Base.Option.value ~default:false (FlowConfig.enable_as_const flowconfig);
opt_as_const = Base.Option.value ~default:true (FlowConfig.enable_as_const flowconfig);
opt_component_syntax = FlowConfig.component_syntax flowconfig;
opt_react_rules = FlowConfig.react_rules flowconfig;
opt_hook_compatibility = FlowConfig.hook_compatibility flowconfig;
Expand Down
1 change: 0 additions & 1 deletion tests/as_const/.flowconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[options]
all=true
as_const=true
experimental.ts_syntax=true
no_flowlib=false
1 change: 0 additions & 1 deletion tests/natural_inference_primitive/.flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

[options]
all=true
as_const=true
experimental.natural_inference.exports.primitive_const=true

[strict]
1 change: 0 additions & 1 deletion tests/type_at_pos_const_literals/.flowconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
[options]
all=true
as_const=true

0 comments on commit 56ebaf0

Please sign in to comment.