@@ -3332,6 +3332,10 @@ pub struct Nursery {
3332
3332
#[ doc = "Enforce the use of String.slice() over String.substr() and String.substring()." ]
3333
3333
#[ serde( skip_serializing_if = "Option::is_none" ) ]
3334
3334
pub no_substr : Option < RuleFixConfiguration < biome_js_analyze:: options:: NoSubstr > > ,
3335
+ #[ doc = "Disallow template literal placeholder syntax in regular strings." ]
3336
+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
3337
+ pub no_template_curly_in_string :
3338
+ Option < RuleConfiguration < biome_js_analyze:: options:: NoTemplateCurlyInString > > ,
3335
3339
#[ doc = "Disallow unknown pseudo-class selectors." ]
3336
3340
#[ serde( skip_serializing_if = "Option::is_none" ) ]
3337
3341
pub no_unknown_pseudo_class :
@@ -3429,6 +3433,7 @@ impl Nursery {
3429
3433
"noSecrets" ,
3430
3434
"noStaticElementInteractions" ,
3431
3435
"noSubstr" ,
3436
+ "noTemplateCurlyInString" ,
3432
3437
"noUnknownPseudoClass" ,
3433
3438
"noUnknownPseudoElement" ,
3434
3439
"noUselessEscapeInRegex" ,
@@ -3464,13 +3469,13 @@ impl Nursery {
3464
3469
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 2 ] ) ,
3465
3470
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 3 ] ) ,
3466
3471
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 8 ] ) ,
3467
- RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 17 ] ) ,
3468
3472
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 18 ] ) ,
3469
3473
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 19 ] ) ,
3470
- RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 22 ] ) ,
3471
- RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 25 ] ) ,
3474
+ RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 20 ] ) ,
3475
+ RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 23 ] ) ,
3472
3476
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 26 ] ) ,
3473
- RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 30 ] ) ,
3477
+ RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 27 ] ) ,
3478
+ RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 31 ] ) ,
3474
3479
] ;
3475
3480
const ALL_RULES_AS_FILTERS : & ' static [ RuleFilter < ' static > ] = & [
3476
3481
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 0 ] ) ,
@@ -3506,6 +3511,7 @@ impl Nursery {
3506
3511
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 30 ] ) ,
3507
3512
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 31 ] ) ,
3508
3513
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 32 ] ) ,
3514
+ RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 33 ] ) ,
3509
3515
] ;
3510
3516
#[ doc = r" Retrieves the recommended rules" ]
3511
3517
pub ( crate ) fn is_recommended_true ( & self ) -> bool {
@@ -3607,86 +3613,91 @@ impl Nursery {
3607
3613
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 16 ] ) ) ;
3608
3614
}
3609
3615
}
3610
- if let Some ( rule) = self . no_unknown_pseudo_class . as_ref ( ) {
3616
+ if let Some ( rule) = self . no_template_curly_in_string . as_ref ( ) {
3611
3617
if rule. is_enabled ( ) {
3612
3618
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 17 ] ) ) ;
3613
3619
}
3614
3620
}
3615
- if let Some ( rule) = self . no_unknown_pseudo_element . as_ref ( ) {
3621
+ if let Some ( rule) = self . no_unknown_pseudo_class . as_ref ( ) {
3616
3622
if rule. is_enabled ( ) {
3617
3623
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 18 ] ) ) ;
3618
3624
}
3619
3625
}
3620
- if let Some ( rule) = self . no_useless_escape_in_regex . as_ref ( ) {
3626
+ if let Some ( rule) = self . no_unknown_pseudo_element . as_ref ( ) {
3621
3627
if rule. is_enabled ( ) {
3622
3628
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 19 ] ) ) ;
3623
3629
}
3624
3630
}
3625
- if let Some ( rule) = self . no_value_at_rule . as_ref ( ) {
3631
+ if let Some ( rule) = self . no_useless_escape_in_regex . as_ref ( ) {
3626
3632
if rule. is_enabled ( ) {
3627
3633
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 20 ] ) ) ;
3628
3634
}
3629
3635
}
3630
- if let Some ( rule) = self . use_adjacent_overload_signatures . as_ref ( ) {
3636
+ if let Some ( rule) = self . no_value_at_rule . as_ref ( ) {
3631
3637
if rule. is_enabled ( ) {
3632
3638
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 21 ] ) ) ;
3633
3639
}
3634
3640
}
3635
- if let Some ( rule) = self . use_aria_props_supported_by_role . as_ref ( ) {
3641
+ if let Some ( rule) = self . use_adjacent_overload_signatures . as_ref ( ) {
3636
3642
if rule. is_enabled ( ) {
3637
3643
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 22 ] ) ) ;
3638
3644
}
3639
3645
}
3640
- if let Some ( rule) = self . use_component_export_only_modules . as_ref ( ) {
3646
+ if let Some ( rule) = self . use_aria_props_supported_by_role . as_ref ( ) {
3641
3647
if rule. is_enabled ( ) {
3642
3648
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 23 ] ) ) ;
3643
3649
}
3644
3650
}
3645
- if let Some ( rule) = self . use_consistent_curly_braces . as_ref ( ) {
3651
+ if let Some ( rule) = self . use_component_export_only_modules . as_ref ( ) {
3646
3652
if rule. is_enabled ( ) {
3647
3653
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 24 ] ) ) ;
3648
3654
}
3649
3655
}
3650
- if let Some ( rule) = self . use_consistent_member_accessibility . as_ref ( ) {
3656
+ if let Some ( rule) = self . use_consistent_curly_braces . as_ref ( ) {
3651
3657
if rule. is_enabled ( ) {
3652
3658
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 25 ] ) ) ;
3653
3659
}
3654
3660
}
3655
- if let Some ( rule) = self . use_deprecated_reason . as_ref ( ) {
3661
+ if let Some ( rule) = self . use_consistent_member_accessibility . as_ref ( ) {
3656
3662
if rule. is_enabled ( ) {
3657
3663
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 26 ] ) ) ;
3658
3664
}
3659
3665
}
3660
- if let Some ( rule) = self . use_explicit_function_return_type . as_ref ( ) {
3666
+ if let Some ( rule) = self . use_deprecated_reason . as_ref ( ) {
3661
3667
if rule. is_enabled ( ) {
3662
3668
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 27 ] ) ) ;
3663
3669
}
3664
3670
}
3665
- if let Some ( rule) = self . use_import_restrictions . as_ref ( ) {
3671
+ if let Some ( rule) = self . use_explicit_function_return_type . as_ref ( ) {
3666
3672
if rule. is_enabled ( ) {
3667
3673
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 28 ] ) ) ;
3668
3674
}
3669
3675
}
3670
- if let Some ( rule) = self . use_sorted_classes . as_ref ( ) {
3676
+ if let Some ( rule) = self . use_import_restrictions . as_ref ( ) {
3671
3677
if rule. is_enabled ( ) {
3672
3678
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 29 ] ) ) ;
3673
3679
}
3674
3680
}
3675
- if let Some ( rule) = self . use_strict_mode . as_ref ( ) {
3681
+ if let Some ( rule) = self . use_sorted_classes . as_ref ( ) {
3676
3682
if rule. is_enabled ( ) {
3677
3683
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 30 ] ) ) ;
3678
3684
}
3679
3685
}
3680
- if let Some ( rule) = self . use_trim_start_end . as_ref ( ) {
3686
+ if let Some ( rule) = self . use_strict_mode . as_ref ( ) {
3681
3687
if rule. is_enabled ( ) {
3682
3688
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 31 ] ) ) ;
3683
3689
}
3684
3690
}
3685
- if let Some ( rule) = self . use_valid_autocomplete . as_ref ( ) {
3691
+ if let Some ( rule) = self . use_trim_start_end . as_ref ( ) {
3686
3692
if rule. is_enabled ( ) {
3687
3693
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 32 ] ) ) ;
3688
3694
}
3689
3695
}
3696
+ if let Some ( rule) = self . use_valid_autocomplete . as_ref ( ) {
3697
+ if rule. is_enabled ( ) {
3698
+ index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 33 ] ) ) ;
3699
+ }
3700
+ }
3690
3701
index_set
3691
3702
}
3692
3703
pub ( crate ) fn get_disabled_rules ( & self ) -> FxHashSet < RuleFilter < ' static > > {
@@ -3776,86 +3787,91 @@ impl Nursery {
3776
3787
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 16 ] ) ) ;
3777
3788
}
3778
3789
}
3779
- if let Some ( rule) = self . no_unknown_pseudo_class . as_ref ( ) {
3790
+ if let Some ( rule) = self . no_template_curly_in_string . as_ref ( ) {
3780
3791
if rule. is_disabled ( ) {
3781
3792
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 17 ] ) ) ;
3782
3793
}
3783
3794
}
3784
- if let Some ( rule) = self . no_unknown_pseudo_element . as_ref ( ) {
3795
+ if let Some ( rule) = self . no_unknown_pseudo_class . as_ref ( ) {
3785
3796
if rule. is_disabled ( ) {
3786
3797
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 18 ] ) ) ;
3787
3798
}
3788
3799
}
3789
- if let Some ( rule) = self . no_useless_escape_in_regex . as_ref ( ) {
3800
+ if let Some ( rule) = self . no_unknown_pseudo_element . as_ref ( ) {
3790
3801
if rule. is_disabled ( ) {
3791
3802
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 19 ] ) ) ;
3792
3803
}
3793
3804
}
3794
- if let Some ( rule) = self . no_value_at_rule . as_ref ( ) {
3805
+ if let Some ( rule) = self . no_useless_escape_in_regex . as_ref ( ) {
3795
3806
if rule. is_disabled ( ) {
3796
3807
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 20 ] ) ) ;
3797
3808
}
3798
3809
}
3799
- if let Some ( rule) = self . use_adjacent_overload_signatures . as_ref ( ) {
3810
+ if let Some ( rule) = self . no_value_at_rule . as_ref ( ) {
3800
3811
if rule. is_disabled ( ) {
3801
3812
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 21 ] ) ) ;
3802
3813
}
3803
3814
}
3804
- if let Some ( rule) = self . use_aria_props_supported_by_role . as_ref ( ) {
3815
+ if let Some ( rule) = self . use_adjacent_overload_signatures . as_ref ( ) {
3805
3816
if rule. is_disabled ( ) {
3806
3817
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 22 ] ) ) ;
3807
3818
}
3808
3819
}
3809
- if let Some ( rule) = self . use_component_export_only_modules . as_ref ( ) {
3820
+ if let Some ( rule) = self . use_aria_props_supported_by_role . as_ref ( ) {
3810
3821
if rule. is_disabled ( ) {
3811
3822
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 23 ] ) ) ;
3812
3823
}
3813
3824
}
3814
- if let Some ( rule) = self . use_consistent_curly_braces . as_ref ( ) {
3825
+ if let Some ( rule) = self . use_component_export_only_modules . as_ref ( ) {
3815
3826
if rule. is_disabled ( ) {
3816
3827
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 24 ] ) ) ;
3817
3828
}
3818
3829
}
3819
- if let Some ( rule) = self . use_consistent_member_accessibility . as_ref ( ) {
3830
+ if let Some ( rule) = self . use_consistent_curly_braces . as_ref ( ) {
3820
3831
if rule. is_disabled ( ) {
3821
3832
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 25 ] ) ) ;
3822
3833
}
3823
3834
}
3824
- if let Some ( rule) = self . use_deprecated_reason . as_ref ( ) {
3835
+ if let Some ( rule) = self . use_consistent_member_accessibility . as_ref ( ) {
3825
3836
if rule. is_disabled ( ) {
3826
3837
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 26 ] ) ) ;
3827
3838
}
3828
3839
}
3829
- if let Some ( rule) = self . use_explicit_function_return_type . as_ref ( ) {
3840
+ if let Some ( rule) = self . use_deprecated_reason . as_ref ( ) {
3830
3841
if rule. is_disabled ( ) {
3831
3842
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 27 ] ) ) ;
3832
3843
}
3833
3844
}
3834
- if let Some ( rule) = self . use_import_restrictions . as_ref ( ) {
3845
+ if let Some ( rule) = self . use_explicit_function_return_type . as_ref ( ) {
3835
3846
if rule. is_disabled ( ) {
3836
3847
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 28 ] ) ) ;
3837
3848
}
3838
3849
}
3839
- if let Some ( rule) = self . use_sorted_classes . as_ref ( ) {
3850
+ if let Some ( rule) = self . use_import_restrictions . as_ref ( ) {
3840
3851
if rule. is_disabled ( ) {
3841
3852
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 29 ] ) ) ;
3842
3853
}
3843
3854
}
3844
- if let Some ( rule) = self . use_strict_mode . as_ref ( ) {
3855
+ if let Some ( rule) = self . use_sorted_classes . as_ref ( ) {
3845
3856
if rule. is_disabled ( ) {
3846
3857
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 30 ] ) ) ;
3847
3858
}
3848
3859
}
3849
- if let Some ( rule) = self . use_trim_start_end . as_ref ( ) {
3860
+ if let Some ( rule) = self . use_strict_mode . as_ref ( ) {
3850
3861
if rule. is_disabled ( ) {
3851
3862
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 31 ] ) ) ;
3852
3863
}
3853
3864
}
3854
- if let Some ( rule) = self . use_valid_autocomplete . as_ref ( ) {
3865
+ if let Some ( rule) = self . use_trim_start_end . as_ref ( ) {
3855
3866
if rule. is_disabled ( ) {
3856
3867
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 32 ] ) ) ;
3857
3868
}
3858
3869
}
3870
+ if let Some ( rule) = self . use_valid_autocomplete . as_ref ( ) {
3871
+ if rule. is_disabled ( ) {
3872
+ index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 33 ] ) ) ;
3873
+ }
3874
+ }
3859
3875
index_set
3860
3876
}
3861
3877
#[ doc = r" Checks if, given a rule name, matches one of the rules contained in this category" ]
@@ -3960,6 +3976,10 @@ impl Nursery {
3960
3976
. no_substr
3961
3977
. as_ref ( )
3962
3978
. map ( |conf| ( conf. level ( ) , conf. get_options ( ) ) ) ,
3979
+ "noTemplateCurlyInString" => self
3980
+ . no_template_curly_in_string
3981
+ . as_ref ( )
3982
+ . map ( |conf| ( conf. level ( ) , conf. get_options ( ) ) ) ,
3963
3983
"noUnknownPseudoClass" => self
3964
3984
. no_unknown_pseudo_class
3965
3985
. as_ref ( )
0 commit comments