Skip to content

Commit

Permalink
[flow] Cleanup experimental.react_rules
Browse files Browse the repository at this point in the history
Summary: Changelog: [internal]

Reviewed By: gkz

Differential Revision: D66964438

fbshipit-source-id: eeea7ec0302d443ec083fee311f51a95f276810e
  • Loading branch information
SamChou19815 authored and facebook-github-bot committed Dec 9, 2024
1 parent 25e2860 commit 65bffe6
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
14 changes: 0 additions & 14 deletions src/commands/config/flowConfig.ml
Original file line number Diff line number Diff line change
Expand Up @@ -611,19 +611,6 @@ module Opts = struct
Ok opts
)

let react_rules_parser =
let open Options in
enum
~init:(fun opts -> { opts with react_rules = [] })
~multiple:true
[
("validateRefAccessDuringRender", ValidateRefAccessDuringRender);
("deepReadOnlyProps", DeepReadOnlyProps);
("deepReadOnlyHookReturns", DeepReadOnlyHookReturns);
("rulesOfHooks", RulesOfHooks);
]
(fun opts v -> Ok { opts with react_rules = v :: opts.react_rules })

let hook_compatibility_includes_parser =
string
~init:(fun opts -> { opts with hook_compatibility_includes = [] })
Expand Down Expand Up @@ -1027,7 +1014,6 @@ module Opts = struct
( "experimental.component_syntax.hooklike_functions.excludes",
hook_compatibility_excludes_parser
);
("experimental.react_rule", react_rules_parser);
("experimental.facebook_module_interop", facebook_module_interop_parser);
("experimental.module.automatic_require_default", automatic_require_default_parser);
("experimental.strict_es6_import_export", strict_es6_import_export_parser);
Expand Down
2 changes: 0 additions & 2 deletions tests/component_syntax/.flowconfig
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
[options]
component_syntax=true
experimental.component_syntax.hook_compatibility=true
experimental.react_rule=deepReadOnlyProps
experimental.react_rule=rulesOfHooks
all=true
no_flowlib=false
react.ref_as_prop=disabled
Expand Down
1 change: 0 additions & 1 deletion tests/hook_syntax_compatibility_excludes/.flowconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[options]
component_syntax=true
experimental.react_rule=rulesOfHooks
experimental.component_syntax.hook_compatibility=true
experimental.component_syntax.hook_compatibility.excludes=<PROJECT_ROOT>/exclude_provider\\.js
experimental.component_syntax.hook_compatibility.excludes=<PROJECT_ROOT>/exclude\\.js
Expand Down

0 comments on commit 65bffe6

Please sign in to comment.