@@ -3368,6 +3368,10 @@ pub struct Nursery {
3368
3368
#[ serde( skip_serializing_if = "Option::is_none" ) ]
3369
3369
pub use_deprecated_reason :
3370
3370
Option < RuleConfiguration < biome_graphql_analyze:: options:: UseDeprecatedReason > > ,
3371
+ #[ doc = "Require explicit return types on functions and class methods." ]
3372
+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
3373
+ pub use_explicit_function_return_type :
3374
+ Option < RuleConfiguration < biome_js_analyze:: options:: UseExplicitFunctionReturnType > > ,
3371
3375
#[ doc = "Disallows package private imports." ]
3372
3376
#[ serde( skip_serializing_if = "Option::is_none" ) ]
3373
3377
pub use_import_restrictions :
@@ -3431,6 +3435,7 @@ impl Nursery {
3431
3435
"useConsistentCurlyBraces" ,
3432
3436
"useConsistentMemberAccessibility" ,
3433
3437
"useDeprecatedReason" ,
3438
+ "useExplicitFunctionReturnType" ,
3434
3439
"useImportRestrictions" ,
3435
3440
"useSortedClasses" ,
3436
3441
"useStrictMode" ,
@@ -3461,7 +3466,7 @@ impl Nursery {
3461
3466
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 21 ] ) ,
3462
3467
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 24 ] ) ,
3463
3468
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 25 ] ) ,
3464
- RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 28 ] ) ,
3469
+ RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 29 ] ) ,
3465
3470
] ;
3466
3471
const ALL_RULES_AS_FILTERS : & ' static [ RuleFilter < ' static > ] = & [
3467
3472
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 0 ] ) ,
@@ -3495,6 +3500,7 @@ impl Nursery {
3495
3500
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 28 ] ) ,
3496
3501
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 29 ] ) ,
3497
3502
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 30 ] ) ,
3503
+ RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 31 ] ) ,
3498
3504
] ;
3499
3505
#[ doc = r" Retrieves the recommended rules" ]
3500
3506
pub ( crate ) fn is_recommended_true ( & self ) -> bool {
@@ -3641,31 +3647,36 @@ impl Nursery {
3641
3647
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 25 ] ) ) ;
3642
3648
}
3643
3649
}
3644
- if let Some ( rule) = self . use_import_restrictions . as_ref ( ) {
3650
+ if let Some ( rule) = self . use_explicit_function_return_type . as_ref ( ) {
3645
3651
if rule. is_enabled ( ) {
3646
3652
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 26 ] ) ) ;
3647
3653
}
3648
3654
}
3649
- if let Some ( rule) = self . use_sorted_classes . as_ref ( ) {
3655
+ if let Some ( rule) = self . use_import_restrictions . as_ref ( ) {
3650
3656
if rule. is_enabled ( ) {
3651
3657
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 27 ] ) ) ;
3652
3658
}
3653
3659
}
3654
- if let Some ( rule) = self . use_strict_mode . as_ref ( ) {
3660
+ if let Some ( rule) = self . use_sorted_classes . as_ref ( ) {
3655
3661
if rule. is_enabled ( ) {
3656
3662
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 28 ] ) ) ;
3657
3663
}
3658
3664
}
3659
- if let Some ( rule) = self . use_trim_start_end . as_ref ( ) {
3665
+ if let Some ( rule) = self . use_strict_mode . as_ref ( ) {
3660
3666
if rule. is_enabled ( ) {
3661
3667
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 29 ] ) ) ;
3662
3668
}
3663
3669
}
3664
- if let Some ( rule) = self . use_valid_autocomplete . as_ref ( ) {
3670
+ if let Some ( rule) = self . use_trim_start_end . as_ref ( ) {
3665
3671
if rule. is_enabled ( ) {
3666
3672
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 30 ] ) ) ;
3667
3673
}
3668
3674
}
3675
+ if let Some ( rule) = self . use_valid_autocomplete . as_ref ( ) {
3676
+ if rule. is_enabled ( ) {
3677
+ index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 31 ] ) ) ;
3678
+ }
3679
+ }
3669
3680
index_set
3670
3681
}
3671
3682
pub ( crate ) fn get_disabled_rules ( & self ) -> FxHashSet < RuleFilter < ' static > > {
@@ -3800,31 +3811,36 @@ impl Nursery {
3800
3811
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 25 ] ) ) ;
3801
3812
}
3802
3813
}
3803
- if let Some ( rule) = self . use_import_restrictions . as_ref ( ) {
3814
+ if let Some ( rule) = self . use_explicit_function_return_type . as_ref ( ) {
3804
3815
if rule. is_disabled ( ) {
3805
3816
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 26 ] ) ) ;
3806
3817
}
3807
3818
}
3808
- if let Some ( rule) = self . use_sorted_classes . as_ref ( ) {
3819
+ if let Some ( rule) = self . use_import_restrictions . as_ref ( ) {
3809
3820
if rule. is_disabled ( ) {
3810
3821
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 27 ] ) ) ;
3811
3822
}
3812
3823
}
3813
- if let Some ( rule) = self . use_strict_mode . as_ref ( ) {
3824
+ if let Some ( rule) = self . use_sorted_classes . as_ref ( ) {
3814
3825
if rule. is_disabled ( ) {
3815
3826
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 28 ] ) ) ;
3816
3827
}
3817
3828
}
3818
- if let Some ( rule) = self . use_trim_start_end . as_ref ( ) {
3829
+ if let Some ( rule) = self . use_strict_mode . as_ref ( ) {
3819
3830
if rule. is_disabled ( ) {
3820
3831
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 29 ] ) ) ;
3821
3832
}
3822
3833
}
3823
- if let Some ( rule) = self . use_valid_autocomplete . as_ref ( ) {
3834
+ if let Some ( rule) = self . use_trim_start_end . as_ref ( ) {
3824
3835
if rule. is_disabled ( ) {
3825
3836
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 30 ] ) ) ;
3826
3837
}
3827
3838
}
3839
+ if let Some ( rule) = self . use_valid_autocomplete . as_ref ( ) {
3840
+ if rule. is_disabled ( ) {
3841
+ index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 31 ] ) ) ;
3842
+ }
3843
+ }
3828
3844
index_set
3829
3845
}
3830
3846
#[ doc = r" Checks if, given a rule name, matches one of the rules contained in this category" ]
@@ -3965,6 +3981,10 @@ impl Nursery {
3965
3981
. use_deprecated_reason
3966
3982
. as_ref ( )
3967
3983
. map ( |conf| ( conf. level ( ) , conf. get_options ( ) ) ) ,
3984
+ "useExplicitFunctionReturnType" => self
3985
+ . use_explicit_function_return_type
3986
+ . as_ref ( )
3987
+ . map ( |conf| ( conf. level ( ) , conf. get_options ( ) ) ) ,
3968
3988
"useImportRestrictions" => self
3969
3989
. use_import_restrictions
3970
3990
. as_ref ( )
0 commit comments