@@ -3377,6 +3377,9 @@ pub struct Nursery {
3377
3377
#[ serde( skip_serializing_if = "Option::is_none" ) ]
3378
3378
pub use_aria_props_supported_by_role :
3379
3379
Option < RuleConfiguration < biome_js_analyze:: options:: UseAriaPropsSupportedByRole > > ,
3380
+ #[ doc = "Use at() instead of integer index access." ]
3381
+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
3382
+ pub use_at_index : Option < RuleFixConfiguration < biome_js_analyze:: options:: UseAtIndex > > ,
3380
3383
#[ doc = "Enforce declaring components only within modules that export React Components exclusively." ]
3381
3384
#[ serde( skip_serializing_if = "Option::is_none" ) ]
3382
3385
pub use_component_export_only_modules :
@@ -3463,6 +3466,7 @@ impl Nursery {
3463
3466
"noValueAtRule" ,
3464
3467
"useAdjacentOverloadSignatures" ,
3465
3468
"useAriaPropsSupportedByRole" ,
3469
+ "useAtIndex" ,
3466
3470
"useComponentExportOnlyModules" ,
3467
3471
"useConsistentCurlyBraces" ,
3468
3472
"useConsistentMemberAccessibility" ,
@@ -3500,9 +3504,9 @@ impl Nursery {
3500
3504
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 24 ] ) ,
3501
3505
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 25 ] ) ,
3502
3506
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 28 ] ) ,
3503
- RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 31 ] ) ,
3504
3507
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 32 ] ) ,
3505
- RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 36 ] ) ,
3508
+ RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 33 ] ) ,
3509
+ RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 37 ] ) ,
3506
3510
] ;
3507
3511
const ALL_RULES_AS_FILTERS : & ' static [ RuleFilter < ' static > ] = & [
3508
3512
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 0 ] ) ,
@@ -3544,6 +3548,7 @@ impl Nursery {
3544
3548
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 36 ] ) ,
3545
3549
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 37 ] ) ,
3546
3550
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 38 ] ) ,
3551
+ RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 39 ] ) ,
3547
3552
] ;
3548
3553
#[ doc = r" Retrieves the recommended rules" ]
3549
3554
pub ( crate ) fn is_recommended_true ( & self ) -> bool {
@@ -3705,56 +3710,61 @@ impl Nursery {
3705
3710
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 28 ] ) ) ;
3706
3711
}
3707
3712
}
3708
- if let Some ( rule) = self . use_component_export_only_modules . as_ref ( ) {
3713
+ if let Some ( rule) = self . use_at_index . as_ref ( ) {
3709
3714
if rule. is_enabled ( ) {
3710
3715
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 29 ] ) ) ;
3711
3716
}
3712
3717
}
3713
- if let Some ( rule) = self . use_consistent_curly_braces . as_ref ( ) {
3718
+ if let Some ( rule) = self . use_component_export_only_modules . as_ref ( ) {
3714
3719
if rule. is_enabled ( ) {
3715
3720
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 30 ] ) ) ;
3716
3721
}
3717
3722
}
3718
- if let Some ( rule) = self . use_consistent_member_accessibility . as_ref ( ) {
3723
+ if let Some ( rule) = self . use_consistent_curly_braces . as_ref ( ) {
3719
3724
if rule. is_enabled ( ) {
3720
3725
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 31 ] ) ) ;
3721
3726
}
3722
3727
}
3723
- if let Some ( rule) = self . use_deprecated_reason . as_ref ( ) {
3728
+ if let Some ( rule) = self . use_consistent_member_accessibility . as_ref ( ) {
3724
3729
if rule. is_enabled ( ) {
3725
3730
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 32 ] ) ) ;
3726
3731
}
3727
3732
}
3728
- if let Some ( rule) = self . use_explicit_function_return_type . as_ref ( ) {
3733
+ if let Some ( rule) = self . use_deprecated_reason . as_ref ( ) {
3729
3734
if rule. is_enabled ( ) {
3730
3735
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 33 ] ) ) ;
3731
3736
}
3732
3737
}
3733
- if let Some ( rule) = self . use_import_restrictions . as_ref ( ) {
3738
+ if let Some ( rule) = self . use_explicit_function_return_type . as_ref ( ) {
3734
3739
if rule. is_enabled ( ) {
3735
3740
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 34 ] ) ) ;
3736
3741
}
3737
3742
}
3738
- if let Some ( rule) = self . use_sorted_classes . as_ref ( ) {
3743
+ if let Some ( rule) = self . use_import_restrictions . as_ref ( ) {
3739
3744
if rule. is_enabled ( ) {
3740
3745
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 35 ] ) ) ;
3741
3746
}
3742
3747
}
3743
- if let Some ( rule) = self . use_strict_mode . as_ref ( ) {
3748
+ if let Some ( rule) = self . use_sorted_classes . as_ref ( ) {
3744
3749
if rule. is_enabled ( ) {
3745
3750
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 36 ] ) ) ;
3746
3751
}
3747
3752
}
3748
- if let Some ( rule) = self . use_trim_start_end . as_ref ( ) {
3753
+ if let Some ( rule) = self . use_strict_mode . as_ref ( ) {
3749
3754
if rule. is_enabled ( ) {
3750
3755
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 37 ] ) ) ;
3751
3756
}
3752
3757
}
3753
- if let Some ( rule) = self . use_valid_autocomplete . as_ref ( ) {
3758
+ if let Some ( rule) = self . use_trim_start_end . as_ref ( ) {
3754
3759
if rule. is_enabled ( ) {
3755
3760
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 38 ] ) ) ;
3756
3761
}
3757
3762
}
3763
+ if let Some ( rule) = self . use_valid_autocomplete . as_ref ( ) {
3764
+ if rule. is_enabled ( ) {
3765
+ index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 39 ] ) ) ;
3766
+ }
3767
+ }
3758
3768
index_set
3759
3769
}
3760
3770
pub ( crate ) fn get_disabled_rules ( & self ) -> FxHashSet < RuleFilter < ' static > > {
@@ -3904,56 +3914,61 @@ impl Nursery {
3904
3914
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 28 ] ) ) ;
3905
3915
}
3906
3916
}
3907
- if let Some ( rule) = self . use_component_export_only_modules . as_ref ( ) {
3917
+ if let Some ( rule) = self . use_at_index . as_ref ( ) {
3908
3918
if rule. is_disabled ( ) {
3909
3919
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 29 ] ) ) ;
3910
3920
}
3911
3921
}
3912
- if let Some ( rule) = self . use_consistent_curly_braces . as_ref ( ) {
3922
+ if let Some ( rule) = self . use_component_export_only_modules . as_ref ( ) {
3913
3923
if rule. is_disabled ( ) {
3914
3924
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 30 ] ) ) ;
3915
3925
}
3916
3926
}
3917
- if let Some ( rule) = self . use_consistent_member_accessibility . as_ref ( ) {
3927
+ if let Some ( rule) = self . use_consistent_curly_braces . as_ref ( ) {
3918
3928
if rule. is_disabled ( ) {
3919
3929
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 31 ] ) ) ;
3920
3930
}
3921
3931
}
3922
- if let Some ( rule) = self . use_deprecated_reason . as_ref ( ) {
3932
+ if let Some ( rule) = self . use_consistent_member_accessibility . as_ref ( ) {
3923
3933
if rule. is_disabled ( ) {
3924
3934
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 32 ] ) ) ;
3925
3935
}
3926
3936
}
3927
- if let Some ( rule) = self . use_explicit_function_return_type . as_ref ( ) {
3937
+ if let Some ( rule) = self . use_deprecated_reason . as_ref ( ) {
3928
3938
if rule. is_disabled ( ) {
3929
3939
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 33 ] ) ) ;
3930
3940
}
3931
3941
}
3932
- if let Some ( rule) = self . use_import_restrictions . as_ref ( ) {
3942
+ if let Some ( rule) = self . use_explicit_function_return_type . as_ref ( ) {
3933
3943
if rule. is_disabled ( ) {
3934
3944
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 34 ] ) ) ;
3935
3945
}
3936
3946
}
3937
- if let Some ( rule) = self . use_sorted_classes . as_ref ( ) {
3947
+ if let Some ( rule) = self . use_import_restrictions . as_ref ( ) {
3938
3948
if rule. is_disabled ( ) {
3939
3949
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 35 ] ) ) ;
3940
3950
}
3941
3951
}
3942
- if let Some ( rule) = self . use_strict_mode . as_ref ( ) {
3952
+ if let Some ( rule) = self . use_sorted_classes . as_ref ( ) {
3943
3953
if rule. is_disabled ( ) {
3944
3954
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 36 ] ) ) ;
3945
3955
}
3946
3956
}
3947
- if let Some ( rule) = self . use_trim_start_end . as_ref ( ) {
3957
+ if let Some ( rule) = self . use_strict_mode . as_ref ( ) {
3948
3958
if rule. is_disabled ( ) {
3949
3959
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 37 ] ) ) ;
3950
3960
}
3951
3961
}
3952
- if let Some ( rule) = self . use_valid_autocomplete . as_ref ( ) {
3962
+ if let Some ( rule) = self . use_trim_start_end . as_ref ( ) {
3953
3963
if rule. is_disabled ( ) {
3954
3964
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 38 ] ) ) ;
3955
3965
}
3956
3966
}
3967
+ if let Some ( rule) = self . use_valid_autocomplete . as_ref ( ) {
3968
+ if rule. is_disabled ( ) {
3969
+ index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 39 ] ) ) ;
3970
+ }
3971
+ }
3957
3972
index_set
3958
3973
}
3959
3974
#[ doc = r" Checks if, given a rule name, matches one of the rules contained in this category" ]
@@ -4106,6 +4121,10 @@ impl Nursery {
4106
4121
. use_aria_props_supported_by_role
4107
4122
. as_ref ( )
4108
4123
. map ( |conf| ( conf. level ( ) , conf. get_options ( ) ) ) ,
4124
+ "useAtIndex" => self
4125
+ . use_at_index
4126
+ . as_ref ( )
4127
+ . map ( |conf| ( conf. level ( ) , conf. get_options ( ) ) ) ,
4109
4128
"useComponentExportOnlyModules" => self
4110
4129
. use_component_export_only_modules
4111
4130
. as_ref ( )
0 commit comments