@@ -57,11 +57,6 @@ const recommendedLatestRuleConfigs: Linter.RulesRecord = {
5757
5858const  plugins  =  [ 'react-hooks' ] ; 
5959
60- type  ReactHooksFlatConfig  =  { 
61-   plugins : { react : any } ; 
62-   rules : Linter . RulesRecord ; 
63- } ; 
64- 
6560const  configs  =  { 
6661  recommended : { 
6762    plugins, 
@@ -71,7 +66,7 @@ const configs = {
7166    plugins, 
7267    rules : recommendedLatestRuleConfigs , 
7368  } , 
74-   flat : { }  as  Record < string ,   ReactHooksFlatConfig > , 
69+   flat : { }  as  typeof   flatConfigs , 
7570} ; 
7671
7772const  plugin  =  { 
@@ -83,15 +78,19 @@ const plugin = {
8378  configs, 
8479} ; 
8580
86- Object . assign ( configs . flat ,  { 
81+ const  pluginUnknown : unknown  =  plugin ; 
82+ 
83+ const  flatConfigs  =  { 
8784  'recommended-latest' : { 
88-     plugins : { 'react-hooks' : plugin } , 
89-     rules : configs [ 'recommended-latest' ] . rules , 
85+     plugins : { 'react-hooks' : pluginUnknown } , 
86+     rules : recommendedLatestRuleConfigs , 
9087  } , 
9188  recommended : { 
92-     plugins : { 'react-hooks' : plugin } , 
93-     rules : configs . recommended . rules , 
89+     plugins : { 'react-hooks' : pluginUnknown } , 
90+     rules : recommendedRuleConfigs , 
9491  } , 
95- } ) ; 
92+ } ; 
93+ 
94+ configs . flat  =  flatConfigs ; 
9695
9796export  default  plugin ; 
0 commit comments