Skip to content

Commit

Permalink
chore: update rules.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
chansuke committed Sep 7, 2024
1 parent f9fdc49 commit 52bdeb4
Showing 1 changed file with 67 additions and 65 deletions.
132 changes: 67 additions & 65 deletions crates/biome_configuration/src/analyzer/linter/rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3194,6 +3194,7 @@ impl Nursery {
const RECOMMENDED_RULES: &'static [&'static str] = &[
"noDoneCallback",
"noDuplicateAtImportRules",
"noDuplicateCustomProperties",
"noDuplicateElseIf",
"noDuplicateFontNames",
"noDuplicateSelectorsKeyframeBlock",
Expand Down Expand Up @@ -3222,24 +3223,25 @@ impl Nursery {
const RECOMMENDED_RULES_AS_FILTERS: &'static [RuleFilter<'static>] = &[
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[3]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[22]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[26]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[28]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[23]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[27]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[29]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[30]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[31]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[32]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[34]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[40]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[33]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[35]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[41]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[44]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[47]),
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[50]),
Expand Down Expand Up @@ -3402,147 +3404,147 @@ impl Nursery {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14]));
}
}
if let Some(rule) = self.no_invalid_position_at_import_rule.as_ref() {
if let Some(rule) = self.no_invalid_grid_areas.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15]));
}
}
if let Some(rule) = self.no_irregular_whitespace.as_ref() {
if let Some(rule) = self.no_invalid_position_at_import_rule.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16]));
}
}
if let Some(rule) = self.no_label_without_control.as_ref() {
if let Some(rule) = self.no_irregular_whitespace.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17]));
}
}
if let Some(rule) = self.no_misplaced_assertion.as_ref() {
if let Some(rule) = self.no_label_without_control.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18]));
}
}
if let Some(rule) = self.no_react_specific_props.as_ref() {
if let Some(rule) = self.no_misplaced_assertion.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19]));
}
}
if let Some(rule) = self.no_restricted_imports.as_ref() {
if let Some(rule) = self.no_react_specific_props.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20]));
}
}
if let Some(rule) = self.no_restricted_types.as_ref() {
if let Some(rule) = self.no_restricted_imports.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[21]));
}
}
if let Some(rule) = self.no_shorthand_property_overrides.as_ref() {
if let Some(rule) = self.no_restricted_types.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[22]));
}
}
if let Some(rule) = self.no_static_element_interactions.as_ref() {
if let Some(rule) = self.no_shorthand_property_overrides.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[23]));
}
}
if let Some(rule) = self.no_substr.as_ref() {
if let Some(rule) = self.no_static_element_interactions.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[24]));
}
}
if let Some(rule) = self.no_undeclared_dependencies.as_ref() {
if let Some(rule) = self.no_substr.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[25]));
}
}
if let Some(rule) = self.no_unknown_function.as_ref() {
if let Some(rule) = self.no_undeclared_dependencies.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[26]));
}
}
if let Some(rule) = self.no_unknown_media_feature_name.as_ref() {
if let Some(rule) = self.no_unknown_function.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[27]));
}
}
if let Some(rule) = self.no_unknown_property.as_ref() {
if let Some(rule) = self.no_unknown_media_feature_name.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[28]));
}
}
if let Some(rule) = self.no_unknown_pseudo_class_selector.as_ref() {
if let Some(rule) = self.no_unknown_property.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[29]));
}
}
if let Some(rule) = self.no_unknown_selector_pseudo_element.as_ref() {
if let Some(rule) = self.no_unknown_pseudo_class.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[30]));
}
}
if let Some(rule) = self.no_unknown_unit.as_ref() {
if let Some(rule) = self.no_unknown_pseudo_element.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[31]));
}
}
if let Some(rule) = self.no_unmatchable_anb_selector.as_ref() {
if let Some(rule) = self.no_unknown_unit.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[32]));
}
}
if let Some(rule) = self.no_unused_function_parameters.as_ref() {
if let Some(rule) = self.no_unmatchable_anb_selector.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[33]));
}
}
if let Some(rule) = self.no_useless_escape_in_regex.as_ref() {
if let Some(rule) = self.no_unused_function_parameters.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[34]));
}
}
if let Some(rule) = self.no_useless_string_concat.as_ref() {
if let Some(rule) = self.no_useless_escape_in_regex.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[35]));
}
}
if let Some(rule) = self.no_useless_undefined_initialization.as_ref() {
if let Some(rule) = self.no_useless_string_concat.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[36]));
}
}
if let Some(rule) = self.no_value_at_rule.as_ref() {
if let Some(rule) = self.no_useless_undefined_initialization.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[37]));
}
}
if let Some(rule) = self.no_yoda_expression.as_ref() {
if let Some(rule) = self.no_value_at_rule.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[38]));
}
}
if let Some(rule) = self.use_adjacent_overload_signatures.as_ref() {
if let Some(rule) = self.no_yoda_expression.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[39]));
}
}
if let Some(rule) = self.use_aria_props_supported_by_role.as_ref() {
if let Some(rule) = self.use_adjacent_overload_signatures.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[40]));
}
}
if let Some(rule) = self.use_consistent_builtin_instantiation.as_ref() {
if let Some(rule) = self.use_aria_props_supported_by_role.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[41]));
}
}
if let Some(rule) = self.use_consistent_curly_braces.as_ref() {
if let Some(rule) = self.use_consistent_builtin_instantiation.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[42]));
}
}
if let Some(rule) = self.use_consistent_grid_areas.as_ref() {
if let Some(rule) = self.use_consistent_curly_braces.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[43]));
}
Expand Down Expand Up @@ -3721,147 +3723,147 @@ impl Nursery {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14]));
}
}
if let Some(rule) = self.no_invalid_position_at_import_rule.as_ref() {
if let Some(rule) = self.no_invalid_grid_areas.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15]));
}
}
if let Some(rule) = self.no_irregular_whitespace.as_ref() {
if let Some(rule) = self.no_invalid_position_at_import_rule.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16]));
}
}
if let Some(rule) = self.no_label_without_control.as_ref() {
if let Some(rule) = self.no_irregular_whitespace.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17]));
}
}
if let Some(rule) = self.no_misplaced_assertion.as_ref() {
if let Some(rule) = self.no_label_without_control.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18]));
}
}
if let Some(rule) = self.no_react_specific_props.as_ref() {
if let Some(rule) = self.no_misplaced_assertion.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19]));
}
}
if let Some(rule) = self.no_restricted_imports.as_ref() {
if let Some(rule) = self.no_react_specific_props.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20]));
}
}
if let Some(rule) = self.no_restricted_types.as_ref() {
if let Some(rule) = self.no_restricted_imports.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[21]));
}
}
if let Some(rule) = self.no_shorthand_property_overrides.as_ref() {
if let Some(rule) = self.no_restricted_types.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[22]));
}
}
if let Some(rule) = self.no_static_element_interactions.as_ref() {
if let Some(rule) = self.no_shorthand_property_overrides.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[23]));
}
}
if let Some(rule) = self.no_substr.as_ref() {
if let Some(rule) = self.no_static_element_interactions.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[24]));
}
}
if let Some(rule) = self.no_undeclared_dependencies.as_ref() {
if let Some(rule) = self.no_substr.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[25]));
}
}
if let Some(rule) = self.no_unknown_function.as_ref() {
if let Some(rule) = self.no_undeclared_dependencies.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[26]));
}
}
if let Some(rule) = self.no_unknown_media_feature_name.as_ref() {
if let Some(rule) = self.no_unknown_function.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[27]));
}
}
if let Some(rule) = self.no_unknown_property.as_ref() {
if let Some(rule) = self.no_unknown_media_feature_name.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[28]));
}
}
if let Some(rule) = self.no_unknown_pseudo_class_selector.as_ref() {
if let Some(rule) = self.no_unknown_property.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[29]));
}
}
if let Some(rule) = self.no_unknown_selector_pseudo_element.as_ref() {
if let Some(rule) = self.no_unknown_pseudo_class.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[30]));
}
}
if let Some(rule) = self.no_unknown_unit.as_ref() {
if let Some(rule) = self.no_unknown_pseudo_element.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[31]));
}
}
if let Some(rule) = self.no_unmatchable_anb_selector.as_ref() {
if let Some(rule) = self.no_unknown_unit.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[32]));
}
}
if let Some(rule) = self.no_unused_function_parameters.as_ref() {
if let Some(rule) = self.no_unmatchable_anb_selector.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[33]));
}
}
if let Some(rule) = self.no_useless_escape_in_regex.as_ref() {
if let Some(rule) = self.no_unused_function_parameters.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[34]));
}
}
if let Some(rule) = self.no_useless_string_concat.as_ref() {
if let Some(rule) = self.no_useless_escape_in_regex.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[35]));
}
}
if let Some(rule) = self.no_useless_undefined_initialization.as_ref() {
if let Some(rule) = self.no_useless_string_concat.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[36]));
}
}
if let Some(rule) = self.no_value_at_rule.as_ref() {
if let Some(rule) = self.no_useless_undefined_initialization.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[37]));
}
}
if let Some(rule) = self.no_yoda_expression.as_ref() {
if let Some(rule) = self.no_value_at_rule.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[38]));
}
}
if let Some(rule) = self.use_adjacent_overload_signatures.as_ref() {
if let Some(rule) = self.no_yoda_expression.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[39]));
}
}
if let Some(rule) = self.use_aria_props_supported_by_role.as_ref() {
if let Some(rule) = self.use_adjacent_overload_signatures.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[40]));
}
}
if let Some(rule) = self.use_consistent_builtin_instantiation.as_ref() {
if let Some(rule) = self.use_aria_props_supported_by_role.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[41]));
}
}
if let Some(rule) = self.use_consistent_curly_braces.as_ref() {
if let Some(rule) = self.use_consistent_builtin_instantiation.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[42]));
}
}
if let Some(rule) = self.use_consistent_grid_areas.as_ref() {
if let Some(rule) = self.use_consistent_curly_braces.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[43]));
}
Expand Down

0 comments on commit 52bdeb4

Please sign in to comment.