Repository: biomejs/biome (language: rust)

Issue:
📎 Implement `noConstantBinaryExpression` - `eslint/no-constant-binary-expression`
### Description

Implement [eslint/no-constant-binary-expression](https://eslint.org/docs/latest/rules/no-constant-binary-expression).

**Want to contribute?** Lets you know you are interested! We will assign you to the issue to prevent several people to work on the same issue. Don't worry, we can unassign you later if you are no longer interested in the issue! Read our [contributing guide](https://github.com/biomejs/biome/blob/main/CONTRIBUTING.md) and [analyzer contributing guide](https://github.com/biomejs/biome/blob/main/crates/biome_analyze/CONTRIBUTING.md).


Discussion / hints:

Fix patch:
diff --git a/.changeset/breezy-horses-fetch.md b/.changeset/breezy-horses-fetch.md
new file mode 100644
index 000000000000..30718b890d9f
--- /dev/null
+++ b/.changeset/breezy-horses-fetch.md
@@ -0,0 +1,6 @@
+---
+"@biomejs/biome": minor
+---
+
+Add a new lint rule `noConstantBinaryExpression`.
+This rule is inspired from ESLint's [no-constant-binary-expression](https://eslint.org/docs/latest/rules/no-constant-binary-expression) rule.
diff --git a/crates/biome_cli/src/execute/migrate/eslint_any_rule_to_biome.rs b/crates/biome_cli/src/execute/migrate/eslint_any_rule_to_biome.rs
index 0fd2eda9e9e2..1bada7dca13a 100644
--- a/crates/biome_cli/src/execute/migrate/eslint_any_rule_to_biome.rs
+++ b/crates/biome_cli/src/execute/migrate/eslint_any_rule_to_biome.rs
@@ -1155,6 +1155,17 @@ pub(crate) fn migrate_eslint_any_rule(
                 .get_or_insert(Default::default());
             rule.set_level(rule.level().max(rule_severity.into()));
         }
+        "no-constant-binary-expression" => {
+            if !options.include_nursery {
+                return false;
+            }
+            let group = rules.nursery.get_or_insert_with(Default::default);
+            let rule = group
+                .unwrap_group_as_mut()
+                .no_constant_binary_expression
+                .get_or_insert(Default::default());
+            rule.set_level(rule.level().max(rule_severity.into()));
+        }
         "no-constant-condition" => {
             let group = rules.correctness.get_or_insert_with(Default::default);
             let rule = group
diff --git a/crates/biome_configuration/src/analyzer/linter/rules.rs b/crates/biome_configuration/src/analyzer/linter/rules.rs
index d405eb4e5459..9c50afe053f5 100644
--- a/crates/biome_configuration/src/analyzer/linter/rules.rs
+++ b/crates/biome_configuration/src/analyzer/linter/rules.rs
@@ -3026,6 +3026,10 @@ pub struct Nursery {
     #[doc = "Disallow use of CommonJs module system in favor of ESM style imports."]
     #[serde(skip_serializing_if = "Option::is_none")]
     pub no_common_js: Option<RuleConfiguration<biome_js_analyze::options::NoCommonJs>>,
+    #[doc = "Disallow expressions where the operation doesn't affect the value"]
+    #[serde(skip_serializing_if = "Option::is_none")]
+    pub no_constant_binary_expression:
+        Option<RuleConfiguration<biome_js_analyze::options::NoConstantBinaryExpression>>,
     #[doc = "Disallow a lower specificity selector from coming after a higher specificity selector."]
     #[serde(skip_serializing_if = "Option::is_none")]
     pub no_descending_specificity:
@@ -3251,6 +3255,7 @@ impl Nursery {
     const GROUP_NAME: &'static str = "nursery";
     pub(crate) const GROUP_RULES: &'static [&'static str] = &[
         "noCommonJs",
+        "noConstantBinaryExpression",
         "noDescendingSpecificity",
         "noDocumentCookie",
         "noDocumentImportInPage",
@@ -3313,24 +3318,24 @@ impl Nursery {
         "useValidAutocomplete",
     ];
     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[4]),
+        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2]),
         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[18]),
-        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[31]),
+        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[8]),
+        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19]),
         RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[32]),
         RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[33]),
         RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[34]),
         RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[35]),
-        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[37]),
-        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[42]),
-        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[47]),
+        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[36]),
+        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[38]),
+        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[43]),
         RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[48]),
-        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[54]),
-        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[56]),
-        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[58]),
+        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[49]),
+        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[55]),
+        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[57]),
+        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[59]),
     ];
     const ALL_RULES_AS_FILTERS: &'static [RuleFilter<'static>] = &[
         RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0]),
@@ -3394,6 +3399,7 @@ impl Nursery {
         RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[58]),
         RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[59]),
         RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[60]),
+        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[61]),
     ];
 }
 impl RuleGroupExt for Nursery {
@@ -3410,306 +3416,311 @@ impl RuleGroupExt for Nursery {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0]));
             }
         }
-        if let Some(rule) = self.no_descending_specificity.as_ref() {
+        if let Some(rule) = self.no_constant_binary_expression.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1]));
             }
         }
-        if let Some(rule) = self.no_document_cookie.as_ref() {
+        if let Some(rule) = self.no_descending_specificity.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2]));
             }
         }
-        if let Some(rule) = self.no_document_import_in_page.as_ref() {
+        if let Some(rule) = self.no_document_cookie.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[3]));
             }
         }
-        if let Some(rule) = self.no_duplicate_custom_properties.as_ref() {
+        if let Some(rule) = self.no_document_import_in_page.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4]));
             }
         }
-        if let Some(rule) = self.no_duplicate_else_if.as_ref() {
+        if let Some(rule) = self.no_duplicate_custom_properties.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5]));
             }
         }
-        if let Some(rule) = self.no_duplicate_properties.as_ref() {
+        if let Some(rule) = self.no_duplicate_else_if.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6]));
             }
         }
-        if let Some(rule) = self.no_duplicated_fields.as_ref() {
+        if let Some(rule) = self.no_duplicate_properties.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7]));
             }
         }
-        if let Some(rule) = self.no_dynamic_namespace_import_access.as_ref() {
+        if let Some(rule) = self.no_duplicated_fields.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[8]));
             }
         }
-        if let Some(rule) = self.no_enum.as_ref() {
+        if let Some(rule) = self.no_dynamic_namespace_import_access.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9]));
             }
         }
-        if let Some(rule) = self.no_exported_imports.as_ref() {
+        if let Some(rule) = self.no_enum.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10]));
             }
         }
-        if let Some(rule) = self.no_floating_promises.as_ref() {
+        if let Some(rule) = self.no_exported_imports.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11]));
             }
         }
-        if let Some(rule) = self.no_global_dirname_filename.as_ref() {
+        if let Some(rule) = self.no_floating_promises.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12]));
             }
         }
-        if let Some(rule) = self.no_head_element.as_ref() {
+        if let Some(rule) = self.no_global_dirname_filename.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13]));
             }
         }
-        if let Some(rule) = self.no_head_import_in_document.as_ref() {
+        if let Some(rule) = self.no_head_element.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14]));
             }
         }
-        if let Some(rule) = self.no_img_element.as_ref() {
+        if let Some(rule) = self.no_head_import_in_document.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15]));
             }
         }
-        if let Some(rule) = self.no_import_cycles.as_ref() {
+        if let Some(rule) = self.no_img_element.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16]));
             }
         }
-        if let Some(rule) = self.no_irregular_whitespace.as_ref() {
+        if let Some(rule) = self.no_import_cycles.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17]));
             }
         }
-        if let Some(rule) = self.no_missing_var_function.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[18]));
             }
         }
-        if let Some(rule) = self.no_nested_ternary.as_ref() {
+        if let Some(rule) = self.no_missing_var_function.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19]));
             }
         }
-        if let Some(rule) = self.no_noninteractive_element_interactions.as_ref() {
+        if let Some(rule) = self.no_nested_ternary.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20]));
             }
         }
-        if let Some(rule) = self.no_octal_escape.as_ref() {
+        if let Some(rule) = self.no_noninteractive_element_interactions.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[21]));
             }
         }
-        if let Some(rule) = self.no_package_private_imports.as_ref() {
+        if let Some(rule) = self.no_octal_escape.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[22]));
             }
         }
-        if let Some(rule) = self.no_process_env.as_ref() {
+        if let Some(rule) = self.no_package_private_imports.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[23]));
             }
         }
-        if let Some(rule) = self.no_process_global.as_ref() {
+        if let Some(rule) = self.no_process_env.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[24]));
             }
         }
-        if let Some(rule) = self.no_restricted_imports.as_ref() {
+        if let Some(rule) = self.no_process_global.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[25]));
             }
         }
-        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[26]));
             }
         }
-        if let Some(rule) = self.no_secrets.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[27]));
             }
         }
-        if let Some(rule) = self.no_static_element_interactions.as_ref() {
+        if let Some(rule) = self.no_secrets.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[28]));
             }
         }
-        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[29]));
             }
         }
-        if let Some(rule) = self.no_template_curly_in_string.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[30]));
             }
         }
-        if let Some(rule) = self.no_ts_ignore.as_ref() {
+        if let Some(rule) = self.no_template_curly_in_string.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[31]));
             }
         }
-        if let Some(rule) = self.no_unknown_at_rule.as_ref() {
+        if let Some(rule) = self.no_ts_ignore.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[32]));
             }
         }
-        if let Some(rule) = self.no_unknown_pseudo_class.as_ref() {
+        if let Some(rule) = self.no_unknown_at_rule.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[33]));
             }
         }
-        if let Some(rule) = self.no_unknown_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[34]));
             }
         }
-        if let Some(rule) = self.no_unknown_type_selector.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[35]));
             }
         }
-        if let Some(rule) = self.no_unwanted_polyfillio.as_ref() {
+        if let Some(rule) = self.no_unknown_type_selector.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[36]));
             }
         }
-        if let Some(rule) = self.no_useless_escape_in_regex.as_ref() {
+        if let Some(rule) = self.no_unwanted_polyfillio.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[37]));
             }
         }
-        if let Some(rule) = self.no_useless_string_raw.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[38]));
             }
         }
-        if let Some(rule) = self.no_useless_undefined.as_ref() {
+        if let Some(rule) = self.no_useless_string_raw.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[39]));
             }
         }
-        if let Some(rule) = self.no_value_at_rule.as_ref() {
+        if let Some(rule) = self.no_useless_undefined.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[40]));
             }
         }
-        if let Some(rule) = self.use_adjacent_overload_signatures.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[41]));
             }
         }
-        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[42]));
             }
         }
-        if let Some(rule) = self.use_at_index.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[43]));
             }
         }
-        if let Some(rule) = self.use_collapsed_if.as_ref() {
+        if let Some(rule) = self.use_at_index.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[44]));
             }
         }
-        if let Some(rule) = self.use_component_export_only_modules.as_ref() {
+        if let Some(rule) = self.use_collapsed_if.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[45]));
             }
         }
-        if let Some(rule) = self.use_consistent_curly_braces.as_ref() {
+        if let Some(rule) = self.use_component_export_only_modules.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[46]));
             }
         }
-        if let Some(rule) = self.use_consistent_member_accessibility.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[47]));
             }
         }
-        if let Some(rule) = self.use_deprecated_reason.as_ref() {
+        if let Some(rule) = self.use_consistent_member_accessibility.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[48]));
             }
         }
-        if let Some(rule) = self.use_explicit_type.as_ref() {
+        if let Some(rule) = self.use_deprecated_reason.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[49]));
             }
         }
-        if let Some(rule) = self.use_exports_last.as_ref() {
+        if let Some(rule) = self.use_explicit_type.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[50]));
             }
         }
-        if let Some(rule) = self.use_google_font_display.as_ref() {
+        if let Some(rule) = self.use_exports_last.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[51]));
             }
         }
-        if let Some(rule) = self.use_google_font_preconnect.as_ref() {
+        if let Some(rule) = self.use_google_font_display.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[52]));
             }
         }
-        if let Some(rule) = self.use_guard_for_in.as_ref() {
+        if let Some(rule) = self.use_google_font_preconnect.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[53]));
             }
         }
-        if let Some(rule) = self.use_named_operation.as_ref() {
+        if let Some(rule) = self.use_guard_for_in.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[54]));
             }
         }
-        if let Some(rule) = self.use_naming_convention.as_ref() {
+        if let Some(rule) = self.use_named_operation.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[55]));
             }
         }
-        if let Some(rule) = self.use_parse_int_radix.as_ref() {
+        if let Some(rule) = self.use_naming_convention.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[56]));
             }
         }
-        if let Some(rule) = self.use_sorted_classes.as_ref() {
+        if let Some(rule) = self.use_parse_int_radix.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[57]));
             }
         }
-        if let Some(rule) = self.use_strict_mode.as_ref() {
+        if let Some(rule) = self.use_sorted_classes.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[58]));
             }
         }
-        if let Some(rule) = self.use_trim_start_end.as_ref() {
+        if let Some(rule) = self.use_strict_mode.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[59]));
             }
         }
-        if let Some(rule) = self.use_valid_autocomplete.as_ref() {
+        if let Some(rule) = self.use_trim_start_end.as_ref() {
             if rule.is_enabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[60]));
             }
         }
+        if let Some(rule) = self.use_valid_autocomplete.as_ref() {
+            if rule.is_enabled() {
+                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[61]));
+            }
+        }
         index_set
     }
     fn get_disabled_rules(&self) -> FxHashSet<RuleFilter<'static>> {
@@ -3719,306 +3730,311 @@ impl RuleGroupExt for Nursery {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0]));
             }
         }
-        if let Some(rule) = self.no_descending_specificity.as_ref() {
+        if let Some(rule) = self.no_constant_binary_expression.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1]));
             }
         }
-        if let Some(rule) = self.no_document_cookie.as_ref() {
+        if let Some(rule) = self.no_descending_specificity.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2]));
             }
         }
-        if let Some(rule) = self.no_document_import_in_page.as_ref() {
+        if let Some(rule) = self.no_document_cookie.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[3]));
             }
         }
-        if let Some(rule) = self.no_duplicate_custom_properties.as_ref() {
+        if let Some(rule) = self.no_document_import_in_page.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4]));
             }
         }
-        if let Some(rule) = self.no_duplicate_else_if.as_ref() {
+        if let Some(rule) = self.no_duplicate_custom_properties.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5]));
             }
         }
-        if let Some(rule) = self.no_duplicate_properties.as_ref() {
+        if let Some(rule) = self.no_duplicate_else_if.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6]));
             }
         }
-        if let Some(rule) = self.no_duplicated_fields.as_ref() {
+        if let Some(rule) = self.no_duplicate_properties.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7]));
             }
         }
-        if let Some(rule) = self.no_dynamic_namespace_import_access.as_ref() {
+        if let Some(rule) = self.no_duplicated_fields.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[8]));
             }
         }
-        if let Some(rule) = self.no_enum.as_ref() {
+        if let Some(rule) = self.no_dynamic_namespace_import_access.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9]));
             }
         }
-        if let Some(rule) = self.no_exported_imports.as_ref() {
+        if let Some(rule) = self.no_enum.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10]));
             }
         }
-        if let Some(rule) = self.no_floating_promises.as_ref() {
+        if let Some(rule) = self.no_exported_imports.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11]));
             }
         }
-        if let Some(rule) = self.no_global_dirname_filename.as_ref() {
+        if let Some(rule) = self.no_floating_promises.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12]));
             }
         }
-        if let Some(rule) = self.no_head_element.as_ref() {
+        if let Some(rule) = self.no_global_dirname_filename.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13]));
             }
         }
-        if let Some(rule) = self.no_head_import_in_document.as_ref() {
+        if let Some(rule) = self.no_head_element.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14]));
             }
         }
-        if let Some(rule) = self.no_img_element.as_ref() {
+        if let Some(rule) = self.no_head_import_in_document.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15]));
             }
         }
-        if let Some(rule) = self.no_import_cycles.as_ref() {
+        if let Some(rule) = self.no_img_element.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16]));
             }
         }
-        if let Some(rule) = self.no_irregular_whitespace.as_ref() {
+        if let Some(rule) = self.no_import_cycles.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17]));
             }
         }
-        if let Some(rule) = self.no_missing_var_function.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[18]));
             }
         }
-        if let Some(rule) = self.no_nested_ternary.as_ref() {
+        if let Some(rule) = self.no_missing_var_function.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19]));
             }
         }
-        if let Some(rule) = self.no_noninteractive_element_interactions.as_ref() {
+        if let Some(rule) = self.no_nested_ternary.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20]));
             }
         }
-        if let Some(rule) = self.no_octal_escape.as_ref() {
+        if let Some(rule) = self.no_noninteractive_element_interactions.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[21]));
             }
         }
-        if let Some(rule) = self.no_package_private_imports.as_ref() {
+        if let Some(rule) = self.no_octal_escape.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[22]));
             }
         }
-        if let Some(rule) = self.no_process_env.as_ref() {
+        if let Some(rule) = self.no_package_private_imports.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[23]));
             }
         }
-        if let Some(rule) = self.no_process_global.as_ref() {
+        if let Some(rule) = self.no_process_env.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[24]));
             }
         }
-        if let Some(rule) = self.no_restricted_imports.as_ref() {
+        if let Some(rule) = self.no_process_global.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[25]));
             }
         }
-        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[26]));
             }
         }
-        if let Some(rule) = self.no_secrets.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[27]));
             }
         }
-        if let Some(rule) = self.no_static_element_interactions.as_ref() {
+        if let Some(rule) = self.no_secrets.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[28]));
             }
         }
-        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[29]));
             }
         }
-        if let Some(rule) = self.no_template_curly_in_string.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[30]));
             }
         }
-        if let Some(rule) = self.no_ts_ignore.as_ref() {
+        if let Some(rule) = self.no_template_curly_in_string.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[31]));
             }
         }
-        if let Some(rule) = self.no_unknown_at_rule.as_ref() {
+        if let Some(rule) = self.no_ts_ignore.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[32]));
             }
         }
-        if let Some(rule) = self.no_unknown_pseudo_class.as_ref() {
+        if let Some(rule) = self.no_unknown_at_rule.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[33]));
             }
         }
-        if let Some(rule) = self.no_unknown_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[34]));
             }
         }
-        if let Some(rule) = self.no_unknown_type_selector.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[35]));
             }
         }
-        if let Some(rule) = self.no_unwanted_polyfillio.as_ref() {
+        if let Some(rule) = self.no_unknown_type_selector.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[36]));
             }
         }
-        if let Some(rule) = self.no_useless_escape_in_regex.as_ref() {
+        if let Some(rule) = self.no_unwanted_polyfillio.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[37]));
             }
         }
-        if let Some(rule) = self.no_useless_string_raw.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[38]));
             }
         }
-        if let Some(rule) = self.no_useless_undefined.as_ref() {
+        if let Some(rule) = self.no_useless_string_raw.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[39]));
             }
         }
-        if let Some(rule) = self.no_value_at_rule.as_ref() {
+        if let Some(rule) = self.no_useless_undefined.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[40]));
             }
         }
-        if let Some(rule) = self.use_adjacent_overload_signatures.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[41]));
             }
         }
-        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[42]));
             }
         }
-        if let Some(rule) = self.use_at_index.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[43]));
             }
         }
-        if let Some(rule) = self.use_collapsed_if.as_ref() {
+        if let Some(rule) = self.use_at_index.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[44]));
             }
         }
-        if let Some(rule) = self.use_component_export_only_modules.as_ref() {
+        if let Some(rule) = self.use_collapsed_if.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[45]));
             }
         }
-        if let Some(rule) = self.use_consistent_curly_braces.as_ref() {
+        if let Some(rule) = self.use_component_export_only_modules.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[46]));
             }
         }
-        if let Some(rule) = self.use_consistent_member_accessibility.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[47]));
             }
         }
-        if let Some(rule) = self.use_deprecated_reason.as_ref() {
+        if let Some(rule) = self.use_consistent_member_accessibility.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[48]));
             }
         }
-        if let Some(rule) = self.use_explicit_type.as_ref() {
+        if let Some(rule) = self.use_deprecated_reason.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[49]));
             }
         }
-        if let Some(rule) = self.use_exports_last.as_ref() {
+        if let Some(rule) = self.use_explicit_type.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[50]));
             }
         }
-        if let Some(rule) = self.use_google_font_display.as_ref() {
+        if let Some(rule) = self.use_exports_last.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[51]));
             }
         }
-        if let Some(rule) = self.use_google_font_preconnect.as_ref() {
+        if let Some(rule) = self.use_google_font_display.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[52]));
             }
         }
-        if let Some(rule) = self.use_guard_for_in.as_ref() {
+        if let Some(rule) = self.use_google_font_preconnect.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[53]));
             }
         }
-        if let Some(rule) = self.use_named_operation.as_ref() {
+        if let Some(rule) = self.use_guard_for_in.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[54]));
             }
         }
-        if let Some(rule) = self.use_naming_convention.as_ref() {
+        if let Some(rule) = self.use_named_operation.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[55]));
             }
         }
-        if let Some(rule) = self.use_parse_int_radix.as_ref() {
+        if let Some(rule) = self.use_naming_convention.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[56]));
             }
         }
-        if let Some(rule) = self.use_sorted_classes.as_ref() {
+        if let Some(rule) = self.use_parse_int_radix.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[57]));
             }
         }
-        if let Some(rule) = self.use_strict_mode.as_ref() {
+        if let Some(rule) = self.use_sorted_classes.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[58]));
             }
         }
-        if let Some(rule) = self.use_trim_start_end.as_ref() {
+        if let Some(rule) = self.use_strict_mode.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[59]));
             }
         }
-        if let Some(rule) = self.use_valid_autocomplete.as_ref() {
+        if let Some(rule) = self.use_trim_start_end.as_ref() {
             if rule.is_disabled() {
                 index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[60]));
             }
         }
+        if let Some(rule) = self.use_valid_autocomplete.as_ref() {
+            if rule.is_disabled() {
+                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[61]));
+            }
+        }
         index_set
     }
     #[doc = r" Checks if, given a rule name, matches one of the rules contained in this category"]
@@ -4053,6 +4069,10 @@ impl RuleGroupExt for Nursery {
                 .no_common_js
                 .as_ref()
                 .map(|conf| (conf.level(), conf.get_options())),
+            "noConstantBinaryExpression" => self
+                .no_constant_binary_expression
+                .as_ref()
+                .map(|conf| (conf.level(), conf.get_options())),
             "noDescendingSpecificity" => self
                 .no_descending_specificity
                 .as_ref()
diff --git a/crates/biome_diagnostics_categories/src/categories.rs b/crates/biome_diagnostics_categories/src/categories.rs
index 5d24d1296a72..696cd80549ea 100644
--- a/crates/biome_diagnostics_categories/src/categories.rs
+++ b/crates/biome_diagnostics_categories/src/categories.rs
@@ -137,6 +137,7 @@ define_categories! {
     "lint/nursery/noColorInvalidHex": "https://biomejs.dev/linter/rules/no-color-invalid-hex",
     "lint/nursery/noCommonJs": "https://biomejs.dev/linter/rules/no-common-js",
     "lint/nursery/noConsole": "https://biomejs.dev/linter/rules/no-console",
+    "lint/nursery/noConstantBinaryExpression": "https://biomejs.dev/linter/rules/no-constant-binary-expression",
     "lint/nursery/noDescendingSpecificity": "https://biomejs.dev/linter/rules/no-descending-specificity",
     "lint/nursery/noDocumentCookie": "https://biomejs.dev/linter/rules/no-document-cookie",
     "lint/nursery/noDocumentImportInPage": "https://biomejs.dev/linter/rules/no-document-import-in-page",
diff --git a/crates/biome_js_analyze/src/ast_utils.rs b/crates/biome_js_analyze/src/ast_utils.rs
index 8932b9a46ebb..74b6264a7be5 100644
--- a/crates/biome_js_analyze/src/ast_utils.rs
+++ b/crates/biome_js_analyze/src/ast_utils.rs
@@ -1,5 +1,10 @@
-use biome_js_syntax::{JsLanguage, JsSyntaxNode, JsSyntaxToken};
-use biome_rowan::{AstNode, TriviaPiece};
+use biome_js_semantic::{BindingExtensions, SemanticModel};
+use biome_js_syntax::{
+    AnyJsArrayElement, AnyJsExpression, AnyJsLiteralExpression, AnyJsTemplateElement,
+    JsAssignmentOperator, JsLanguage, JsLogicalOperator, JsSyntaxNode, JsSyntaxToken,
+    JsUnaryOperator,
+};
+use biome_rowan::{AstNode, AstSeparatedList, TriviaPiece};
 
 /// Add any leading and trailing trivia from given source node to the token.
 ///
@@ -59,3 +64,300 @@ fn add_trailing_trivia(trivia: &mut Vec<TriviaPiece>, text: &mut String, node: &
         trivia.push(TriviaPiece::whitespace(1));
     }
 }
+
+pub fn is_constant_condition(
+    test: AnyJsExpression,
+    in_boolean_position: bool,
+    model: &SemanticModel,
+) -> Option<()> {
+    use AnyJsExpression::*;
+
+    match test.omit_parentheses() {
+        AnyJsLiteralExpression(_)
+        | JsObjectExpression(_)
+        | JsFunctionExpression(_)
+        | JsArrowFunctionExpression(_)
+        | JsClassExpression(_) => Some(()),
+        JsUnaryExpression(node) => {
+            use JsUnaryOperator::*;
+
+            let op = node.operator().ok()?;
+            if op == Void || op == Typeof && in_boolean_position {
+                return Some(());
+            }
+            if op == LogicalNot {
+                return is_constant_condition(node.argument().ok()?, true, model);
+            }
+            is_constant_condition(node.argument().ok()?, false, model)
+        }
+        JsBinaryExpression(node) => is_constant_condition(node.left().ok()?, false, model)
+            .and_then(|_| is_constant_condition(node.right().ok()?, false, model)),
+        JsLogicalExpression(node) => {
+            let left = node.left().ok()?;
+            let right = node.right().ok()?;
+            let op = node.operator().ok()?;
+            let is_left_constant =
+                is_constant_condition(left.clone(), in_boolean_position, model).is_some();
+            let is_right_constant =
+                is_constant_condition(right.clone(), in_boolean_position, model).is_some();
+
+            let is_left_short_circuit = is_left_constant && is_logical_identity(left, op);
+            let is_right_short_circuit =
+                in_boolean_position && is_right_constant && is_logical_identity(right, op);
+
+            if (is_left_constant && is_right_constant)
+                || is_left_short_circuit
+                || is_right_short_circuit
+            {
+                Some(())
+            } else {
+                None
+            }
+        }
+        JsSequenceExpression(node) => {
+            is_constant_condition(node.right().ok()?, in_boolean_position, model)
+        }
+        JsIdentifierExpression(node) => {
+            if node.name().ok()?.binding(model).is_some() {
+                // This is any_js_stmt edge case. Modern browsers don't allow to redeclare `undefined` but ESLint handle this so we do
+                return None;
+            }
+            let is_named_undefined = node.name().ok()?.is_undefined();
+            is_named_undefined.then_some(())
+        }
+        JsArrayExpression(node) => {
+            if !in_boolean_position {
+                node.elements()
+                    .into_iter()
+                    .all(|js_statement| {
+                        if let Ok(element) = js_statement {
+                            match element {
+                                AnyJsArrayElement::JsArrayHole(_) => true,
+                                AnyJsArrayElement::JsSpread(node) => {
+                                    if let Ok(argument) = node.argument() {
+                                        is_constant_condition(argument, in_boolean_position, model)
+                                            .is_some()
+                                    } else {
+                                        false
+                                    }
+                                }
+                                _ => element
+                                    .as_any_js_expression()
+                                    .and_then(|node| {
+                                        is_constant_condition(node.clone(), false, model)
+                                    })
+                                    .is_some(),
+                            }
+                        } else {
+                            false
+                        }
+                    })
+                    .then_some(())
+            } else {
+                Some(())
+            }
+        }
+        JsNewExpression(_) => in_boolean_position.then_some(()),
+        JsCallExpression(node) => {
+            if node.has_callee("Boolean") {
+                let callee = node.callee().ok()?;
+                let ident = callee.as_js_identifier_expression()?.name().ok()?;
+                let binding = ident.binding(model);
+                if binding.is_some() {
+                    return None;
+                }
+
+                let args = node.arguments().ok()?.args();
+                if args.is_empty() {
+                    return Some(());
+                }
+                return is_constant_condition(
+                    args.first()?.ok()?.as_any_js_expression()?.clone(),
+                    true,
+                    model,
+                );
+            }
+
+            None
+        }
+        JsAssignmentExpression(node) => {
+            use JsAssignmentOperator::*;
+
+            let operator = node.operator().ok()?;
+            if operator == Assign {
+                return is_constant_condition(node.right().ok()?, in_boolean_position, model);
+            }
+
+            if matches!(operator, LogicalOrAssign | LogicalAndAssign) && in_boolean_position {
+                let new_op = match operator {
+                    LogicalAndAssign => JsLogicalOperator::LogicalAnd,
+                    LogicalOrAssign => JsLogicalOperator::LogicalOr,
+                    _ => unreachable!(),
+                };
+
+                return is_logical_identity(node.right().ok()?, new_op).then_some(());
+            }
+            None
+        }
+        JsTemplateExpression(node) => {
+            let is_tag = node.tag().is_some();
+            let elements = node.elements();
+            let has_truthy_quasi = !is_tag
+                && elements.clone().into_iter().any(|element| match element {
+                    AnyJsTemplateElement::JsTemplateChunkElement(element) => {
+                        if let Ok(quasi) = element.template_chunk_token() {
+                            !quasi.text_trimmed().is_empty()
+                        } else {
+                            false
+                        }
+                    }
+                    AnyJsTemplateElement::JsTemplateElement(_) => false,
+                });
+            if has_truthy_quasi && in_boolean_position {
+                return Some(());
+            }
+
+            elements
+                .into_iter()
+                .all(|element| match element {
+                    AnyJsTemplateElement::JsTemplateChunkElement(_) => !is_tag,
+                    AnyJsTemplateElement::JsTemplateElement(element) => {
+                        if let Ok(expr) = element.expression() {
+                            is_constant_condition(expr, false, model).is_some()
+                        } else {
+                            false
+                        }
+                    }
+                })
+                .then_some(())
+        }
+        _ => None,
+    }
+}
+
+fn is_logical_identity(node: AnyJsExpression, operator: JsLogicalOperator) -> bool {
+    use AnyJsExpression::*;
+    use JsLogicalOperator::*;
+    match node.omit_parentheses() {
+        AnyJsLiteralExpression(node) => {
+            let boolean_value = get_boolean_value(&node);
+            operator == LogicalOr && boolean_value || (operator == LogicalAnd && !boolean_value)
+        }
+        JsUnaryExpression(node) => {
+            if operator != LogicalAnd {
+                return false;
+            }
+
+            if let Ok(node_operator) = node.operator() {
+                node_operator == JsUnaryOperator::Void
+            } else {
+                false
+            }
+        }
+        JsLogicalExpression(node) => {
+            if let Ok(node_operator) = node.operator() {
+                // handles `any_js_stmt && false || b`
+                // `false` is an identity element of `&&` but not `||`
+                // so the logical identity of the whole expression can not be defined.
+                if operator != node_operator {
+                    return false;
+                }
+
+                let is_left_logical_identify = node
+                    .left()
+                    .ok()
+                    .is_some_and(|left| is_logical_identity(left, operator));
+                if is_left_logical_identify {
+                    return true;
+                }
+
+                node.right()
+                    .ok()
+                    .is_some_and(|right| is_logical_identity(right, operator))
+            } else {
+                false
+            }
+        }
+        JsAssignmentExpression(node) => {
+            if let Ok(node_operator) = node.operator() {
+                if let Ok(right) = node.right() {
+                    let is_valid_logical_assignment = match node_operator {
+                        JsAssignmentOperator::LogicalAndAssign
+                            if operator == JsLogicalOperator::LogicalAnd =>
+                        {
+                            true
+                        }
+                        JsAssignmentOperator::LogicalOrAssign
+                            if operator == JsLogicalOperator::LogicalOr =>
+                        {
+                            true
+                        }
+                        _ => false,
+                    };
+
+                    is_valid_logical_assignment && is_logical_identity(right, operator)
+                } else {
+                    false
+                }
+            } else {
+                false
+            }
+        }
+        _ => false,
+    }
+}
+
+fn get_boolean_value(node: &AnyJsLiteralExpression) -> bool {
+    use AnyJsLiteralExpression::*;
+    match node {
+        JsRegexLiteralExpression(_) => true,
+        _ => node
+            .as_static_value()
+            .is_some_and(|value| !value.is_falsy()),
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use biome_js_parser::JsParserOptions;
+    use biome_js_syntax::{AnyJsLiteralExpression, JsFileSource};
+    use biome_rowan::SyntaxNodeCast;
+
+    use super::get_boolean_value;
+
+    fn assert_boolean_value(code: &str, value: bool) {
+        let source = biome_js_parser::parse(code, JsFileSource::tsx(), JsParserOptions::default());
+
+        if source.has_errors() {
+            panic!("syntax error")
+        }
+
+        let literal_expression = source
+            .syntax()
+            .descendants()
+            .find_map(|js_statement| js_statement.cast::<AnyJsLiteralExpression>());
+
+        assert_eq!(
+            get_boolean_value(&literal_expression.expect("Not found AnyLiteralExpression.")),
+            value
+        );
+    }
+    #[test]
+    fn test_get_boolean_value() {
+        assert_boolean_value("false", false);
+        assert_boolean_value("0", false);
+        assert_boolean_value("-0", false);
+        assert_boolean_value("0n", false);
+        assert_boolean_value("let any_js_stmt =\"\"", false);
+        assert_boolean_value("let any_js_stmt = ''", false);
+        assert_boolean_value("null", false);
+
+        assert_boolean_value("true", true);
+        assert_boolean_value("let any_js_stmt = \"0\"", true);
+        assert_boolean_value("let any_js_stmt = \"false\"", true);
+        assert_boolean_value("-42", true);
+        assert_boolean_value("12n", true);
+        assert_boolean_value("3.14", true);
+        assert_boolean_value("-3.14", true);
+    }
+}
diff --git a/crates/biome_js_analyze/src/lint/correctness/no_constant_condition.rs b/crates/biome_js_analyze/src/lint/correctness/no_constant_condition.rs
index ffc658d59ff9..5dd3d1fd1304 100644
--- a/crates/biome_js_analyze/src/lint/correctness/no_constant_condition.rs
+++ b/crates/biome_js_analyze/src/lint/correctness/no_constant_condition.rs
@@ -1,15 +1,14 @@
-use crate::{services::semantic::Semantic, utils::rename::RenamableNode};
+use crate::ast_utils::is_constant_condition;
+use crate::services::semantic::Semantic;
 use biome_analyze::{context::RuleContext, declare_lint_rule, Rule, RuleDiagnostic, RuleSource};
 use biome_console::markup;
 use biome_diagnostics::Severity;
-use biome_js_semantic::SemanticModel;
 use biome_js_syntax::{
-    AnyJsArrayElement, AnyJsExpression, AnyJsLiteralExpression, AnyJsStatement,
-    AnyJsTemplateElement, JsAssignmentOperator, JsConditionalExpression, JsDoWhileStatement,
-    JsForStatement, JsFunctionDeclaration, JsFunctionExpression, JsIfStatement, JsLogicalOperator,
-    JsStatementList, JsSyntaxKind, JsUnaryOperator, JsWhileStatement, JsYieldExpression, TextRange,
+    AnyJsExpression, AnyJsStatement, JsConditionalExpression, JsDoWhileStatement, JsForStatement,
+    JsFunctionDeclaration, JsFunctionExpression, JsIfStatement, JsStatementList, JsSyntaxKind,
+    JsWhileStatement, JsYieldExpression, TextRange,
 };
-use biome_rowan::{declare_node_union, AstNode, AstSeparatedList};
+use biome_rowan::{declare_node_union, AstNode};
 
 declare_lint_rule! {
     /// Disallow constant expressions in conditions
@@ -230,300 +229,3 @@ fn has_valid_yield_expression(stmt: &AnyJsStatement) -> Option<bool> {
         }
     }
 }
-
-fn is_constant_condition(
-    test: AnyJsExpression,
-    in_boolean_position: bool,
-    model: &SemanticModel,
-) -> Option<()> {
-    use AnyJsExpression::*;
-
-    match test.omit_parentheses() {
-        AnyJsLiteralExpression(_)
-        | JsObjectExpression(_)
-        | JsFunctionExpression(_)
-        | JsArrowFunctionExpression(_)
-        | JsClassExpression(_) => Some(()),
-        JsUnaryExpression(node) => {
-            use JsUnaryOperator::*;
-
-            let op = node.operator().ok()?;
-            if op == Void || op == Typeof && in_boolean_position {
-                return Some(());
-            }
-            if op == LogicalNot {
-                return is_constant_condition(node.argument().ok()?, true, model);
-            }
-            is_constant_condition(node.argument().ok()?, false, model)
-        }
-        JsBinaryExpression(node) => is_constant_condition(node.left().ok()?, false, model)
-            .and_then(|_| is_constant_condition(node.right().ok()?, false, model)),
-        JsLogicalExpression(node) => {
-            let left = node.left().ok()?;
-            let right = node.right().ok()?;
-            let op = node.operator().ok()?;
-            let is_left_constant =
-                is_constant_condition(left.clone(), in_boolean_position, model).is_some();
-            let is_right_constant =
-                is_constant_condition(right.clone(), in_boolean_position, model).is_some();
-
-            let is_left_short_circuit = is_left_constant && is_logical_identity(left, op);
-            let is_right_short_circuit =
-                in_boolean_position && is_right_constant && is_logical_identity(right, op);
-
-            if (is_left_constant && is_right_constant)
-                || is_left_short_circuit
-                || is_right_short_circuit
-            {
-                Some(())
-            } else {
-                None
-            }
-        }
-        JsSequenceExpression(node) => {
-            is_constant_condition(node.right().ok()?, in_boolean_position, model)
-        }
-        JsIdentifierExpression(node) => {
-            if node.name().ok()?.binding(model).is_some() {
-                // This is any_js_stmt edge case. Modern browsers don't allow to redeclare `undefined` but ESLint handle this so we do
-                return None;
-            }
-            let is_named_undefined = node.name().ok()?.is_undefined();
-            is_named_undefined.then_some(())
-        }
-        JsArrayExpression(node) => {
-            if !in_boolean_position {
-                node.elements()
-                    .into_iter()
-                    .all(|js_statement| {
-                        if let Ok(element) = js_statement {
-                            match element {
-                                AnyJsArrayElement::JsArrayHole(_) => true,
-                                AnyJsArrayElement::JsSpread(node) => {
-                                    if let Ok(argument) = node.argument() {
-                                        is_constant_condition(argument, in_boolean_position, model)
-                                            .is_some()
-                                    } else {
-                                        false
-                                    }
-                                }
-                                _ => element
-                                    .as_any_js_expression()
-                                    .and_then(|node| {
-                                        is_constant_condition(node.clone(), false, model)
-                                    })
-                                    .is_some(),
-                            }
-                        } else {
-                            false
-                        }
-                    })
-                    .then_some(())
-            } else {
-                Some(())
-            }
-        }
-        JsNewExpression(_) => in_boolean_position.then_some(()),
-        JsCallExpression(node) => {
-            if node.has_callee("Boolean") {
-                let callee = node.callee().ok()?;
-                let ident = callee.as_js_identifier_expression()?.name().ok()?;
-                let binding = ident.binding(model);
-                if binding.is_some() {
-                    return None;
-                }
-
-                let args = node.arguments().ok()?.args();
-                if args.is_empty() {
-                    return Some(());
-                }
-                return is_constant_condition(
-                    args.first()?.ok()?.as_any_js_expression()?.clone(),
-                    true,
-                    model,
-                );
-            }
-
-            None
-        }
-        JsAssignmentExpression(node) => {
-            use JsAssignmentOperator::*;
-
-            let operator = node.operator().ok()?;
-            if operator == Assign {
-                return is_constant_condition(node.right().ok()?, in_boolean_position, model);
-            }
-
-            if matches!(operator, LogicalOrAssign | LogicalAndAssign) && in_boolean_position {
-                let new_op = match operator {
-                    LogicalAndAssign => JsLogicalOperator::LogicalAnd,
-                    LogicalOrAssign => JsLogicalOperator::LogicalOr,
-                    _ => unreachable!(),
-                };
-
-                return is_logical_identity(node.right().ok()?, new_op).then_some(());
-            }
-            None
-        }
-        JsTemplateExpression(node) => {
-            let is_tag = node.tag().is_some();
-            let elements = node.elements();
-            let has_truthy_quasi = !is_tag
-                && elements.clone().into_iter().any(|element| match element {
-                    AnyJsTemplateElement::JsTemplateChunkElement(element) => {
-                        if let Ok(quasi) = element.template_chunk_token() {
-                            !quasi.text_trimmed().is_empty()
-                        } else {
-                            false
-                        }
-                    }
-                    AnyJsTemplateElement::JsTemplateElement(_) => false,
-                });
-            if has_truthy_quasi && in_boolean_position {
-                return Some(());
-            }
-
-            elements
-                .into_iter()
-                .all(|element| match element {
-                    AnyJsTemplateElement::JsTemplateChunkElement(_) => !is_tag,
-                    AnyJsTemplateElement::JsTemplateElement(element) => {
-                        if let Ok(expr) = element.expression() {
-                            is_constant_condition(expr, false, model).is_some()
-                        } else {
-                            false
-                        }
-                    }
-                })
-                .then_some(())
-        }
-        _ => None,
-    }
-}
-
-fn is_logical_identity(node: AnyJsExpression, operator: JsLogicalOperator) -> bool {
-    use AnyJsExpression::*;
-    use JsLogicalOperator::*;
-    match node.omit_parentheses() {
-        AnyJsLiteralExpression(node) => {
-            let boolean_value = get_boolean_value(&node);
-            operator == LogicalOr && boolean_value || (operator == LogicalAnd && !boolean_value)
-        }
-        JsUnaryExpression(node) => {
-            if operator != LogicalAnd {
-                return false;
-            }
-
-            if let Ok(node_operator) = node.operator() {
-                node_operator == JsUnaryOperator::Void
-            } else {
-                false
-            }
-        }
-        JsLogicalExpression(node) => {
-            if let Ok(node_operator) = node.operator() {
-                // handles `any_js_stmt && false || b`
-                // `false` is an identity element of `&&` but not `||`
-                // so the logical identity of the whole expression can not be defined.
-                if operator != node_operator {
-                    return false;
-                }
-
-                let is_left_logical_identify = node
-                    .left()
-                    .ok()
-                    .is_some_and(|left| is_logical_identity(left, operator));
-                if is_left_logical_identify {
-                    return true;
-                }
-
-                node.right()
-                    .ok()
-                    .is_some_and(|right| is_logical_identity(right, operator))
-            } else {
-                false
-            }
-        }
-        JsAssignmentExpression(node) => {
-            if let Ok(node_operator) = node.operator() {
-                if let Ok(right) = node.right() {
-                    let is_valid_logical_assignment = match node_operator {
-                        JsAssignmentOperator::LogicalAndAssign
-                            if operator == JsLogicalOperator::LogicalAnd =>
-                        {
-                            true
-                        }
-                        JsAssignmentOperator::LogicalOrAssign
-                            if operator == JsLogicalOperator::LogicalOr =>
-                        {
-                            true
-                        }
-                        _ => false,
-                    };
-
-                    is_valid_logical_assignment && is_logical_identity(right, operator)
-                } else {
-                    false
-                }
-            } else {
-                false
-            }
-        }
-        _ => false,
-    }
-}
-
-fn get_boolean_value(node: &AnyJsLiteralExpression) -> bool {
-    use AnyJsLiteralExpression::*;
-    match node {
-        JsRegexLiteralExpression(_) => true,
-        _ => node
-            .as_static_value()
-            .is_some_and(|value| !value.is_falsy()),
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use biome_js_parser::JsParserOptions;
-    use biome_js_syntax::{AnyJsLiteralExpression, JsFileSource};
-    use biome_rowan::SyntaxNodeCast;
-
-    use super::get_boolean_value;
-
-    fn assert_boolean_value(code: &str, value: bool) {
-        let source = biome_js_parser::parse(code, JsFileSource::tsx(), JsParserOptions::default());
-
-        if source.has_errors() {
-            panic!("syntax error")
-        }
-
-        let literal_expression = source
-            .syntax()
-            .descendants()
-            .find_map(|js_statement| js_statement.cast::<AnyJsLiteralExpression>());
-
-        assert_eq!(
-            get_boolean_value(&literal_expression.expect("Not found AnyLiteralExpression.")),
-            value
-        );
-    }
-    #[test]
-    fn test_get_boolean_value() {
-        assert_boolean_value("false", false);
-        assert_boolean_value("0", false);
-        assert_boolean_value("-0", false);
-        assert_boolean_value("0n", false);
-        assert_boolean_value("let any_js_stmt =\"\"", false);
-        assert_boolean_value("let any_js_stmt = ''", false);
-        assert_boolean_value("null", false);
-
-        assert_boolean_value("true", true);
-        assert_boolean_value("let any_js_stmt = \"0\"", true);
-        assert_boolean_value("let any_js_stmt = \"false\"", true);
-        assert_boolean_value("-42", true);
-        assert_boolean_value("12n", true);
-        assert_boolean_value("3.14", true);
-        assert_boolean_value("-3.14", true);
-    }
-}
diff --git a/crates/biome_js_analyze/src/lint/nursery.rs b/crates/biome_js_analyze/src/lint/nursery.rs
index 43da73dfb3e9..70c34d4fd202 100644
--- a/crates/biome_js_analyze/src/lint/nursery.rs
+++ b/crates/biome_js_analyze/src/lint/nursery.rs
@@ -4,6 +4,7 @@
 
 use biome_analyze::declare_lint_group;
 pub mod no_common_js;
+pub mod no_constant_binary_expression;
 pub mod no_document_cookie;
 pub mod no_document_import_in_page;
 pub mod no_duplicate_else_if;
@@ -51,4 +52,4 @@ pub mod use_sorted_classes;
 pub mod use_strict_mode;
 pub mod use_trim_start_end;
 pub mod use_valid_autocomplete;
-declare_lint_group! { pub Nursery { name : "nursery" , rules : [self :: no_common_js :: NoCommonJs , self :: no_document_cookie :: NoDocumentCookie , self :: no_document_import_in_page :: NoDocumentImportInPage , self :: no_duplicate_else_if :: NoDuplicateElseIf , self :: no_dynamic_namespace_import_access :: NoDynamicNamespaceImportAccess , self :: no_enum :: NoEnum , self :: no_exported_imports :: NoExportedImports , self :: no_floating_promises :: NoFloatingPromises , self :: no_global_dirname_filename :: NoGlobalDirnameFilename , self :: no_head_element :: NoHeadElement , self :: no_head_import_in_document :: NoHeadImportInDocument , self :: no_img_element :: NoImgElement , self :: no_import_cycles :: NoImportCycles , self :: no_irregular_whitespace :: NoIrregularWhitespace , self :: no_nested_ternary :: NoNestedTernary , self :: no_noninteractive_element_interactions :: NoNoninteractiveElementInteractions , self :: no_octal_escape :: NoOctalEscape , self :: no_package_private_imports :: NoPackagePrivateImports , self :: no_process_env :: NoProcessEnv , self :: no_process_global :: NoProcessGlobal , self :: no_restricted_imports :: NoRestrictedImports , self :: no_restricted_types :: NoRestrictedTypes , self :: no_secrets :: NoSecrets , self :: no_static_element_interactions :: NoStaticElementInteractions , self :: no_substr :: NoSubstr , self :: no_template_curly_in_string :: NoTemplateCurlyInString , self :: no_ts_ignore :: NoTsIgnore , self :: no_unwanted_polyfillio :: NoUnwantedPolyfillio , self :: no_useless_escape_in_regex :: NoUselessEscapeInRegex , self :: no_useless_string_raw :: NoUselessStringRaw , self :: no_useless_undefined :: NoUselessUndefined , self :: use_adjacent_overload_signatures :: UseAdjacentOverloadSignatures , self :: use_aria_props_supported_by_role :: UseAriaPropsSupportedByRole , self :: use_at_index :: UseAtIndex , self :: use_collapsed_if :: UseCollapsedIf , self :: use_component_export_only_modules :: UseComponentExportOnlyModules , self :: use_consistent_curly_braces :: UseConsistentCurlyBraces , self :: use_consistent_member_accessibility :: UseConsistentMemberAccessibility , self :: use_explicit_type :: UseExplicitType , self :: use_exports_last :: UseExportsLast , self :: use_google_font_display :: UseGoogleFontDisplay , self :: use_google_font_preconnect :: UseGoogleFontPreconnect , self :: use_guard_for_in :: UseGuardForIn , self :: use_parse_int_radix :: UseParseIntRadix , self :: use_sorted_classes :: UseSortedClasses , self :: use_strict_mode :: UseStrictMode , self :: use_trim_start_end :: UseTrimStartEnd , self :: use_valid_autocomplete :: UseValidAutocomplete ,] } }
+declare_lint_group! { pub Nursery { name : "nursery" , rules : [self :: no_common_js :: NoCommonJs , self :: no_constant_binary_expression :: NoConstantBinaryExpression , self :: no_document_cookie :: NoDocumentCookie , self :: no_document_import_in_page :: NoDocumentImportInPage , self :: no_duplicate_else_if :: NoDuplicateElseIf , self :: no_dynamic_namespace_import_access :: NoDynamicNamespaceImportAccess , self :: no_enum :: NoEnum , self :: no_exported_imports :: NoExportedImports , self :: no_floating_promises :: NoFloatingPromises , self :: no_global_dirname_filename :: NoGlobalDirnameFilename , self :: no_head_element :: NoHeadElement , self :: no_head_import_in_document :: NoHeadImportInDocument , self :: no_img_element :: NoImgElement , self :: no_import_cycles :: NoImportCycles , self :: no_irregular_whitespace :: NoIrregularWhitespace , self :: no_nested_ternary :: NoNestedTernary , self :: no_noninteractive_element_interactions :: NoNoninteractiveElementInteractions , self :: no_octal_escape :: NoOctalEscape , self :: no_package_private_imports :: NoPackagePrivateImports , self :: no_process_env :: NoProcessEnv , self :: no_process_global :: NoProcessGlobal , self :: no_restricted_imports :: NoRestrictedImports , self :: no_restricted_types :: NoRestrictedTypes , self :: no_secrets :: NoSecrets , self :: no_static_element_interactions :: NoStaticElementInteractions , self :: no_substr :: NoSubstr , self :: no_template_curly_in_string :: NoTemplateCurlyInString , self :: no_ts_ignore :: NoTsIgnore , self :: no_unwanted_polyfillio :: NoUnwantedPolyfillio , self :: no_useless_escape_in_regex :: NoUselessEscapeInRegex , self :: no_useless_string_raw :: NoUselessStringRaw , self :: no_useless_undefined :: NoUselessUndefined , self :: use_adjacent_overload_signatures :: UseAdjacentOverloadSignatures , self :: use_aria_props_supported_by_role :: UseAriaPropsSupportedByRole , self :: use_at_index :: UseAtIndex , self :: use_collapsed_if :: UseCollapsedIf , self :: use_component_export_only_modules :: UseComponentExportOnlyModules , self :: use_consistent_curly_braces :: UseConsistentCurlyBraces , self :: use_consistent_member_accessibility :: UseConsistentMemberAccessibility , self :: use_explicit_type :: UseExplicitType , self :: use_exports_last :: UseExportsLast , self :: use_google_font_display :: UseGoogleFontDisplay , self :: use_google_font_preconnect :: UseGoogleFontPreconnect , self :: use_guard_for_in :: UseGuardForIn , self :: use_parse_int_radix :: UseParseIntRadix , self :: use_sorted_classes :: UseSortedClasses , self :: use_strict_mode :: UseStrictMode , self :: use_trim_start_end :: UseTrimStartEnd , self :: use_valid_autocomplete :: UseValidAutocomplete ,] } }
diff --git a/crates/biome_js_analyze/src/lint/nursery/no_constant_binary_expression.rs b/crates/biome_js_analyze/src/lint/nursery/no_constant_binary_expression.rs
new file mode 100644
index 000000000000..296e085d791e
--- /dev/null
+++ b/crates/biome_js_analyze/src/lint/nursery/no_constant_binary_expression.rs
@@ -0,0 +1,603 @@
+use biome_analyze::{
+    context::RuleContext, declare_lint_rule, Rule, RuleDiagnostic, RuleSource, RuleSourceKind,
+};
+use biome_console::fmt::{Display, Formatter};
+use biome_console::markup;
+use biome_js_semantic::{BindingExtensions, SemanticModel};
+use biome_js_syntax::{
+    AnyJsArrayElement, AnyJsCallArgument, AnyJsExpression, AnyJsLiteralExpression,
+    AnyJsTemplateElement, JsAssignmentOperator, JsBinaryExpression, JsBinaryOperator,
+    JsCallExpression, JsIdentifierExpression, JsLogicalExpression, JsLogicalOperator,
+    JsReferenceIdentifier, JsUnaryOperator,
+};
+use biome_rowan::{declare_node_union, AstNode, AstNodeList, AstSeparatedList, SyntaxResult};
+
+use crate::ast_utils::is_constant_condition;
+use crate::globals::is_js_language_global;
+use crate::services::semantic::Semantic;
+
+declare_lint_rule! {
+    /// Disallow expressions where the operation doesn't affect the value
+    ///
+    /// Comparisons which will always evaluate to true or false and logical expressions
+    /// (`||`, `&&`, `??`) which either always short-circuit or never short-circuit are both likely
+    /// indications of programmer error.
+    ///
+    /// ## Examples
+    ///
+    /// ### Invalid
+    ///
+    /// ```js,expect_diagnostic
+    /// const value1 = +x == null;
+    /// ```
+    ///
+    /// ```js,expect_diagnostic
+    /// const value2 = condition ? x : {} || DEFAULT;
+    /// ```
+    ///
+    /// ```js,expect_diagnostic
+    /// const value3 = !foo == null;
+    /// ```
+    ///
+    /// ```js,expect_diagnostic
+    /// const value4 = new Boolean(foo) === true;
+    /// ```
+    ///
+    /// ```js,expect_diagnostic
+    /// const objIsEmpty = someObj === {};
+    /// ```
+    ///
+    /// ```js,expect_diagnostic
+    /// const arrIsEmpty = someArr === [];
+    /// ```
+    ///
+    /// ```js,expect_diagnostic
+    /// const shortCircuit1 = condition1 && false && condition2;
+    /// ```
+    ///
+    /// ```js,expect_diagnostic
+    /// const shortCircuit2 = condition1 || true || condition2;
+    /// ```
+    ///
+    /// ```js,expect_diagnostic
+    /// const shortCircuit3 = condition1 ?? "non-nullish" ?? condition2;
+    /// ```
+    ///
+    /// ### Valid
+    ///
+    /// ```js
+    /// const value1 = x == null;
+    /// ```
+    ///
+    /// ```js
+    /// const value2 = (condition ? x : {}) || DEFAULT;
+    /// ```
+    ///
+    /// ```js
+    /// const value3 = !(foo == null);
+    /// ```
+    ///
+    /// ```js
+    /// const value4 = Boolean(foo) === true;
+    /// ```
+    ///
+    /// ```js
+    /// const objIsEmpty = Object.keys(someObj).length === 0;
+    /// ```
+    ///
+    /// ```js
+    /// const arrIsEmpty = someArr.length === 0;
+    /// ```
+    ///
+    pub NoConstantBinaryExpression {
+        version: "next",
+        name: "noConstantBinaryExpression",
+        language: "js",
+        recommended: false,
+        sources: &[RuleSource::Eslint("no-constant-binary-expression")],
+        source_kind: RuleSourceKind::SameLogic,
+    }
+}
+
+declare_node_union! {
+    pub Query = JsLogicalExpression | JsBinaryExpression
+}
+
+pub enum Property {
+    Truthiness,
+    Nullishness,
+}
+
+impl Display for Property {
+    fn fmt(&self, fmt: &mut Formatter) -> std::io::Result<()> {
+        match self {
+            Self::Truthiness => fmt.write_str("truthiness"),
+            Self::Nullishness => fmt.write_str("nullishness"),
+        }
+    }
+}
+
+pub enum Issue {
+    /// A binary expression leads to a constant result, so it can be simplified.
+    /// For example, `[] == true` is always true, while `[] === true` is always false.
+    ConstantBinaryOperand {
+        /// An operand in the expression that will always lead to the same result on comparison
+        /// with  `==`, `!=`, `===`, or `!==` operator.
+        operand: AnyJsExpression,
+    },
+
+    /// The left-hand of a logical expression leads to a constant result, so it can be simplified.
+    /// For example, `{} ?? foo` will always return the left-hand value, while `null ?? foo` will
+    /// always return the right-hand value.
+    ConstantShortCircuit {
+        /// Left-hand operand of the expression.
+        left: AnyJsExpression,
+
+        /// Right-hand operand of the expression.
+        right: AnyJsExpression,
+
+        /// Which property the expression will have constantly, truthiness or nullishness.
+        property: Property,
+    },
+
+    /// A binary expression that always compare to a new object, so it can be simplified.
+    /// For example, the result of `foo === []` is always false.
+    AlwaysNew {
+        /// An operand in the expression that will always construct a new object.
+        operand: AnyJsExpression,
+    },
+
+    /// A strict binary expression that always compare two new objects, so it can be simplified.
+    /// For example, the result of `[] != []` is always true.
+    BothAlwaysNew,
+}
+
+impl Rule for NoConstantBinaryExpression {
+    type Query = Semantic<Query>;
+    type State = Issue;
+    type Signals = Option<Self::State>;
+    type Options = ();
+
+    fn run(ctx: &RuleContext<Self>) -> Self::Signals {
+        let model = ctx.model();
+        match ctx.query() {
+            Query::JsLogicalExpression(expr) => {
+                let operator = expr.operator().ok()?;
+                let left = expr.left().ok()?;
+                let right = expr.right().ok()?;
+
+                match operator {
+                    JsLogicalOperator::LogicalAnd | JsLogicalOperator::LogicalOr => {
+                        if is_constant_condition(left.clone(), true, model).is_some() {
+                            return Some(Issue::ConstantShortCircuit {
+                                left,
+                                right,
+                                property: Property::Truthiness,
+                            });
+                        }
+                    }
+                    JsLogicalOperator::NullishCoalescing => {
+                        if let Ok(true) = has_constant_nullishness(model, &left, false) {
+                            return Some(Issue::ConstantShortCircuit {
+                                left,
+                                right,
+                                property: Property::Nullishness,
+                            });
+                        }
+                    }
+                }
+            }
+            Query::JsBinaryExpression(expr) => {
+                let operator = expr.operator().ok()?;
+                let left = expr.left().ok()?;
+                let right = expr.right().ok()?;
+
+                if let Some(operand) =
+                    find_binary_expression_constant_operand(model, operator, &left, &right)
+                {
+                    return Some(Issue::ConstantBinaryOperand {
+                        operand: operand.clone(),
+                    });
+                }
+
+                if let Some(operand) =
+                    find_binary_expression_constant_operand(model, operator, &right, &left)
+                {
+                    return Some(Issue::ConstantBinaryOperand {
+                        operand: operand.clone(),
+                    });
+                }
+
+                match operator {
+                    JsBinaryOperator::StrictEquality | JsBinaryOperator::StrictInequality => {
+                        if let Ok(true) = is_always_new(model, &left) {
+                            return Some(Issue::AlwaysNew { operand: left });
+                        }
+                        if let Ok(true) = is_always_new(model, &right) {
+                            return Some(Issue::AlwaysNew { operand: right });
+                        }
+                    }
+                    JsBinaryOperator::Equality | JsBinaryOperator::Inequality => {
+                        if let (Ok(true), Ok(true)) =
+                            (is_always_new(model, &left), is_always_new(model, &right))
+                        {
+                            return Some(Issue::BothAlwaysNew);
+                        }
+                    }
+                    _ => {}
+                }
+            }
+        }
+
+        None
+    }
+
+    fn diagnostic(ctx: &RuleContext<Self>, state: &Self::State) -> Option<RuleDiagnostic> {
+        let node = ctx.query();
+
+        Some(match state {
+            Issue::ConstantBinaryOperand { .. } => RuleDiagnostic::new(
+                rule_category!(),
+                node.range(),
+                markup! { "This binary expression leads to a constant result." },
+            ),
+            Issue::ConstantShortCircuit { left, property, .. } => RuleDiagnostic::new(
+                rule_category!(),
+                node.range(),
+                markup! { "This logical expression can be simplified." },
+            )
+            .detail(
+                left.range(),
+                markup! { "This operand always evaluates to the same "{property}"." },
+            ),
+            Issue::AlwaysNew { operand } => RuleDiagnostic::new(
+                rule_category!(),
+                node.range(),
+                markup! { "Unexpected comparison to newly constructed object." },
+            )
+            .detail(
+                operand.range(),
+                markup! { "This expression always constructs a new object."},
+            ),
+            Issue::BothAlwaysNew => RuleDiagnostic::new(
+                rule_category!(),
+                node.range(),
+                markup! { "Unexpected comparison of two newly constructed objects." },
+            ),
+        })
+    }
+}
+
+fn find_binary_expression_constant_operand<'a>(
+    model: &SemanticModel,
+    operator: JsBinaryOperator,
+    a: &'a AnyJsExpression,
+    b: &'a AnyJsExpression,
+) -> Option<&'a AnyJsExpression> {
+    match operator {
+        JsBinaryOperator::Equality | JsBinaryOperator::Inequality => {
+            if (is_null_or_undefined(model, a).ok()?
+                && has_constant_nullishness(model, b, false).ok()?)
+                || (is_static_boolean(model, a).ok()?
+                    && has_constant_loose_boolean_comparison(model, b).ok()?)
+            {
+                return Some(b);
+            }
+        }
+        JsBinaryOperator::StrictEquality | JsBinaryOperator::StrictInequality => {
+            if (is_null_or_undefined(model, a).ok()?
+                && has_constant_nullishness(model, b, false).ok()?)
+                || (is_static_boolean(model, a).ok()?
+                    && has_constant_strict_boolean_comparison(model, b).ok()?)
+            {
+                return Some(b);
+            }
+        }
+        _ => {}
+    }
+
+    None
+}
+
+// Check the expression will always give the same result when compared to a boolean value loosely.
+fn has_constant_loose_boolean_comparison(
+    model: &SemanticModel,
+    node: &AnyJsExpression,
+) -> SyntaxResult<bool> {
+    Ok(match node.clone().omit_parentheses() {
+        // always truthy
+        AnyJsExpression::JsObjectExpression(_)
+        | AnyJsExpression::JsClassExpression(_)
+        | AnyJsExpression::JsArrowFunctionExpression(_)
+        | AnyJsExpression::JsFunctionExpression(_) => true,
+
+        // literals never change
+        AnyJsExpression::AnyJsLiteralExpression(_) => true,
+
+        // can have a custom .valueOf() or .toString() implementation
+        AnyJsExpression::JsNewExpression(_) => false,
+
+        AnyJsExpression::JsArrayExpression(expr) => {
+            // always falsy when the array is empty
+            expr.elements().is_empty()
+                // single value array `[x]` can be `[0]` (falsy) or `[1]` (truthy)
+                || expr.elements().elements().filter(|element| {
+                    matches!(element.node(), Ok(AnyJsArrayElement::AnyJsExpression(_)))
+                }).count() > 1
+        }
+
+        AnyJsExpression::JsUnaryExpression(expr) => match expr.operator()? {
+            JsUnaryOperator::Void => true,   // always undefined
+            JsUnaryOperator::Typeof => true, // always truthy
+            JsUnaryOperator::LogicalNot => {
+                is_constant_condition(expr.argument()?, true, model).is_some()
+            }
+            _ => false,
+        },
+
+        AnyJsExpression::JsCallExpression(expr) => is_constant_boolean_cast(model, &expr)?,
+
+        AnyJsExpression::JsIdentifierExpression(expr) => is_undefined(model, &expr)?,
+
+        AnyJsExpression::JsTemplateExpression(expr) => !expr
+            .elements()
+            .iter()
+            .any(|element| matches!(element, AnyJsTemplateElement::JsTemplateElement(_))),
+
+        AnyJsExpression::JsAssignmentExpression(expr) => match expr.operator()? {
+            JsAssignmentOperator::Assign => {
+                has_constant_loose_boolean_comparison(model, &expr.right()?)?
+            }
+            _ => false,
+        },
+
+        AnyJsExpression::JsSequenceExpression(expr) => {
+            has_constant_loose_boolean_comparison(model, &expr.right()?)?
+        }
+
+        _ => false,
+    })
+}
+
+// Check the expression will always give the same result when compared to a boolean value strictly.
+fn has_constant_strict_boolean_comparison(
+    model: &SemanticModel,
+    node: &AnyJsExpression,
+) -> SyntaxResult<bool> {
+    Ok(match node.clone().omit_parentheses() {
+        // not a boolean
+        AnyJsExpression::JsObjectExpression(_)
+        | AnyJsExpression::JsArrayExpression(_)
+        | AnyJsExpression::JsArrowFunctionExpression(_)
+        | AnyJsExpression::JsFunctionExpression(_)
+        | AnyJsExpression::JsClassExpression(_)
+        | AnyJsExpression::JsNewExpression(_)
+        | AnyJsExpression::JsTemplateExpression(_)
+        | AnyJsExpression::JsPreUpdateExpression(_)
+        | AnyJsExpression::JsPostUpdateExpression(_) => true,
+
+        // literals never change
+        AnyJsExpression::AnyJsLiteralExpression(_) => true,
+
+        AnyJsExpression::JsBinaryExpression(expr) => matches!(
+            expr.operator()?,
+            JsBinaryOperator::Plus
+                | JsBinaryOperator::Minus
+                | JsBinaryOperator::Times
+                | JsBinaryOperator::Divide
+                | JsBinaryOperator::Remainder
+                | JsBinaryOperator::Exponent
+                | JsBinaryOperator::BitwiseAnd
+                | JsBinaryOperator::BitwiseOr
+                | JsBinaryOperator::BitwiseXor
+                | JsBinaryOperator::LeftShift
+                | JsBinaryOperator::RightShift
+                | JsBinaryOperator::UnsignedRightShift
+        ),
+
+        AnyJsExpression::JsUnaryExpression(expr) => match expr.operator()? {
+            JsUnaryOperator::Delete => false,
+            JsUnaryOperator::LogicalNot => {
+                is_constant_condition(expr.argument()?, true, model).is_some()
+            }
+            _ => true,
+        },
+
+        AnyJsExpression::JsSequenceExpression(expr) => {
+            has_constant_strict_boolean_comparison(model, &expr.right()?)?
+        }
+
+        AnyJsExpression::JsIdentifierExpression(expr) => is_undefined(model, &expr)?,
+
+        AnyJsExpression::JsAssignmentExpression(expr) => match expr.operator()? {
+            JsAssignmentOperator::Assign => {
+                has_constant_strict_boolean_comparison(model, &expr.right()?)?
+            }
+
+            // TODO: Handle short-circuiting assignment operators
+            JsAssignmentOperator::LogicalAndAssign
+            | JsAssignmentOperator::LogicalOrAssign
+            | JsAssignmentOperator::NullishCoalescingAssign => false,
+
+            _ => true,
+        },
+
+        AnyJsExpression::JsCallExpression(expr) => match expr.callee()? {
+            AnyJsExpression::JsIdentifierExpression(ident) => {
+                let name = ident.name()?;
+
+                ((name.has_name("String") || name.has_name("Number"))
+                    && is_global_reference(model, &name))
+                    || is_constant_boolean_cast(model, &expr)?
+            }
+            _ => false,
+        },
+
+        _ => false,
+    })
+}
+
+/// Check the expression will always result a new object.
+fn is_always_new(model: &SemanticModel, node: &AnyJsExpression) -> SyntaxResult<bool> {
+    Ok(match node.clone().omit_parentheses() {
+        AnyJsExpression::JsObjectExpression(_)
+        | AnyJsExpression::JsArrayExpression(_)
+        | AnyJsExpression::JsArrowFunctionExpression(_)
+        | AnyJsExpression::JsFunctionExpression(_)
+        | AnyJsExpression::JsClassExpression(_) => true,
+
+        AnyJsExpression::JsNewExpression(expr) => match expr.callee()? {
+            AnyJsExpression::JsIdentifierExpression(ident) => {
+                let name = ident.name()?;
+                is_js_language_global(name.name()?.text()) && is_global_reference(model, &name)
+            }
+            _ => false,
+        },
+
+        // Regex literals are objects
+        AnyJsExpression::AnyJsLiteralExpression(expr) => {
+            matches!(expr, AnyJsLiteralExpression::JsRegexLiteralExpression(_))
+        }
+
+        AnyJsExpression::JsConditionalExpression(expr) => {
+            is_always_new(model, &expr.consequent()?)? && is_always_new(model, &expr.alternate()?)?
+        }
+
+        _ => false,
+    })
+}
+
+/// Check the expression will result always true or always false.
+fn is_static_boolean(model: &SemanticModel, node: &AnyJsExpression) -> SyntaxResult<bool> {
+    Ok(match node.clone().omit_parentheses() {
+        AnyJsExpression::AnyJsLiteralExpression(expr) => {
+            matches!(expr, AnyJsLiteralExpression::JsBooleanLiteralExpression(_))
+        }
+
+        AnyJsExpression::JsCallExpression(expr) => is_constant_boolean_cast(model, &expr)?,
+
+        AnyJsExpression::JsUnaryExpression(expr) => {
+            expr.operator()? == JsUnaryOperator::LogicalNot
+                && is_constant_condition(expr.argument()?, true, model).is_some()
+        }
+
+        _ => false,
+    })
+}
+
+/// Check the call expression is `Boolean(x)` call and `x` is a constant condition.
+fn is_constant_boolean_cast(model: &SemanticModel, node: &JsCallExpression) -> SyntaxResult<bool> {
+    let AnyJsExpression::JsIdentifierExpression(ident) = node.callee()? else {
+        return Ok(false);
+    };
+
+    let name = ident.name()?;
+
+    Ok(
+        // Boolean(expr) is constant where expr is constant
+        name.has_name("Boolean") && is_global_reference(model, &name) && {
+            match node.arguments()?.args().first() {
+                Some(arg) => match arg? {
+                    AnyJsCallArgument::AnyJsExpression(expr) => {
+                        is_constant_condition(expr, true, model).is_some()
+                    }
+                    _ => false,
+                },
+                _ => true,
+            }
+        },
+    )
+}
+
+/// Check the expression has constant nullishness: always nullish or never nullish.
+fn has_constant_nullishness(
+    model: &SemanticModel,
+    node: &AnyJsExpression,
+    non_nullish: bool,
+) -> SyntaxResult<bool> {
+    if non_nullish && is_null_or_undefined(model, node)? {
+        return Ok(false);
+    }
+
+    Ok(match node.clone().omit_parentheses() {
+        // never nullish
+        AnyJsExpression::JsObjectExpression(_)
+        | AnyJsExpression::JsArrayExpression(_)
+        | AnyJsExpression::JsArrowFunctionExpression(_)
+        | AnyJsExpression::JsFunctionExpression(_)
+        | AnyJsExpression::JsClassExpression(_)
+        | AnyJsExpression::JsNewExpression(_)
+        | AnyJsExpression::AnyJsLiteralExpression(_)
+        | AnyJsExpression::JsTemplateExpression(_)
+        | AnyJsExpression::JsPreUpdateExpression(_)
+        | AnyJsExpression::JsPostUpdateExpression(_)
+        | AnyJsExpression::JsBinaryExpression(_)
+        | AnyJsExpression::JsUnaryExpression(_)
+        | AnyJsExpression::JsInstanceofExpression(_)
+        | AnyJsExpression::JsInExpression(_) => true,
+
+        AnyJsExpression::JsCallExpression(expr) => match expr.callee()? {
+            AnyJsExpression::JsIdentifierExpression(ident) => {
+                let name = ident.name()?;
+
+                (name.has_name("Boolean") || name.has_name("String") || name.has_name("Number"))
+                    && model.scope(ident.syntax()).is_global_scope()
+            }
+            _ => false,
+        },
+
+        AnyJsExpression::JsLogicalExpression(expr) => {
+            expr.operator()? == JsLogicalOperator::NullishCoalescing
+                && has_constant_nullishness(model, &expr.right()?, true)?
+        }
+
+        AnyJsExpression::JsAssignmentExpression(expr) => match expr.operator()? {
+            JsAssignmentOperator::Assign => {
+                has_constant_nullishness(model, &expr.right()?, non_nullish)?
+            }
+
+            // TODO: Handle short-circuiting assignment operators
+            JsAssignmentOperator::LogicalAndAssign
+            | JsAssignmentOperator::LogicalOrAssign
+            | JsAssignmentOperator::NullishCoalescingAssign => false,
+
+            // always non-nullish
+            _ => true,
+        },
+
+        AnyJsExpression::JsSequenceExpression(expr) => {
+            has_constant_nullishness(model, &expr.right()?, non_nullish)?
+        }
+
+        AnyJsExpression::JsIdentifierExpression(expr) => is_undefined(model, &expr)?,
+
+        _ => false,
+    })
+}
+
+/// Check the expression always result a null or undefined value.
+fn is_null_or_undefined(model: &SemanticModel, node: &AnyJsExpression) -> SyntaxResult<bool> {
+    Ok(match node.clone().omit_parentheses() {
+        AnyJsExpression::AnyJsLiteralExpression(expr) => {
+            matches!(expr, AnyJsLiteralExpression::JsNullLiteralExpression(_))
+        }
+
+        AnyJsExpression::JsIdentifierExpression(expr) => is_undefined(model, &expr)?,
+
+        AnyJsExpression::JsUnaryExpression(expr) => expr.operator()? == JsUnaryOperator::Void,
+
+        _ => false,
+    })
+}
+
+/// Check the identifier is a reference of the global `undefined` variable.
+fn is_undefined(model: &SemanticModel, node: &JsIdentifierExpression) -> SyntaxResult<bool> {
+    node.name()
+        .map(|ident| ident.is_undefined() && is_global_reference(model, &ident))
+}
+
+/// Check the referenced variable is in the global scope.
+fn is_global_reference(model: &SemanticModel, node: &JsReferenceIdentifier) -> bool {
+    node.binding(model)
+        .map_or(true, |b| b.scope().is_global_scope())
+}
diff --git a/crates/biome_js_analyze/src/options.rs b/crates/biome_js_analyze/src/options.rs
index 700eb09976b8..e4578b7a0cf4 100644
--- a/crates/biome_js_analyze/src/options.rs
+++ b/crates/biome_js_analyze/src/options.rs
@@ -43,6 +43,7 @@ pub type NoConstAssign =
     <lint::correctness::no_const_assign::NoConstAssign as biome_analyze::Rule>::Options;
 pub type NoConstEnum =
     <lint::suspicious::no_const_enum::NoConstEnum as biome_analyze::Rule>::Options;
+pub type NoConstantBinaryExpression = < lint :: nursery :: no_constant_binary_expression :: NoConstantBinaryExpression as biome_analyze :: Rule > :: Options ;
 pub type NoConstantCondition =
     <lint::correctness::no_constant_condition::NoConstantCondition as biome_analyze::Rule>::Options;
 pub type NoConstantMathMinMaxClamp = < lint :: correctness :: no_constant_math_min_max_clamp :: NoConstantMathMinMaxClamp as biome_analyze :: Rule > :: Options ;
diff --git a/packages/@biomejs/backend-jsonrpc/src/workspace.ts b/packages/@biomejs/backend-jsonrpc/src/workspace.ts
index cdc7cb87fb35..faebc6317c06 100644
--- a/packages/@biomejs/backend-jsonrpc/src/workspace.ts
+++ b/packages/@biomejs/backend-jsonrpc/src/workspace.ts
@@ -1467,6 +1467,10 @@ export interface Nursery {
 	 * Disallow use of CommonJs module system in favor of ESM style imports.
 	 */
 	noCommonJs?: RuleConfiguration_for_Null;
+	/**
+	 * Disallow expressions where the operation doesn't affect the value
+	 */
+	noConstantBinaryExpression?: RuleConfiguration_for_Null;
 	/**
 	 * Disallow a lower specificity selector from coming after a higher specificity selector.
 	 */
@@ -3293,6 +3297,7 @@ export type Category =
 	| "lint/nursery/noColorInvalidHex"
 	| "lint/nursery/noCommonJs"
 	| "lint/nursery/noConsole"
+	| "lint/nursery/noConstantBinaryExpression"
 	| "lint/nursery/noDescendingSpecificity"
 	| "lint/nursery/noDocumentCookie"
 	| "lint/nursery/noDocumentImportInPage"
diff --git a/packages/@biomejs/biome/configuration_schema.json b/packages/@biomejs/biome/configuration_schema.json
index c3c38210af2f..267b948698f9 100644
--- a/packages/@biomejs/biome/configuration_schema.json
+++ b/packages/@biomejs/biome/configuration_schema.json
@@ -2484,6 +2484,13 @@
 						{ "type": "null" }
 					]
 				},
+				"noConstantBinaryExpression": {
+					"description": "Disallow expressions where the operation doesn't affect the value",
+					"anyOf": [
+						{ "$ref": "#/definitions/RuleConfiguration" },
+						{ "type": "null" }
+					]
+				},
 				"noDescendingSpecificity": {
 					"description": "Disallow a lower specificity selector from coming after a higher specificity selector.",
 					"anyOf": [


Test patch:
diff --git a/crates/biome_js_analyze/tests/specs/nursery/noConstantBinaryExpression/invalid.js b/crates/biome_js_analyze/tests/specs/nursery/noConstantBinaryExpression/invalid.js
new file mode 100644
index 000000000000..450d80d404b4
--- /dev/null
+++ b/crates/biome_js_analyze/tests/specs/nursery/noConstantBinaryExpression/invalid.js
@@ -0,0 +1,248 @@
+[] && greeting;
+[] || greeting;
+[] ?? greeting;
+[] == true;
+true == [];
+[] != true;
+[] === true;
+[] !== true;
+
+!foo == null;
+!foo ?? bar;
+(a + b) / 2 ?? bar;
+String(foo.bar) ?? baz;
+"hello" + name ?? "";
+[foo?.bar ?? ""] ?? [];
+
+// Logical expression with constant truthiness
+true && hello;
+true || hello;
+true && foo;
+'' && foo;
+100 && foo;
++100 && foo;
+-100 && foo;
+~100 && foo;
+/[a-z]/ && foo;
+Boolean([]) && foo;
+Boolean() && foo;
+Boolean([], n) && foo;
+({}) && foo;
+[] && foo;
+(() => {}) && foo;
+(function() {}) && foo;
+(class {}) && foo;
+(class { valueOf() { return x; } }) && foo;
+(class { [x]() { return x; } }) && foo;
+new Foo() && foo;
+
+// (boxed values are always truthy)
+new Boolean(unknown) && foo;
+(bar = false) && foo;
+(bar.baz = false) && foo;
+(bar[0] = false) && foo;
+`hello ${hello}` && foo;
+void bar && foo;
+!true && foo;
+typeof bar && foo;
+(bar, baz, true) && foo;
+undefined && foo;
+
+// Logical expression with constant nullishness
+({}) ?? foo;
+([]) ?? foo;
+(() => {}) ?? foo;
+(function() {}) ?? foo;
+(class {}) ?? foo;
+new Foo() ?? foo;
+1 ?? foo;
+/[a-z]/ ?? foo;
+`${''}` ?? foo;
+(a = true) ?? foo;
+(a += 1) ?? foo;
+(a -= 1) ?? foo;
+(a *= 1) ?? foo;
+(a /= 1) ?? foo;
+(a %= 1) ?? foo;
+(a <<= 1) ?? foo;
+(a >>= 1) ?? foo;
+(a >>>= 1) ?? foo;
+(a |= 1) ?? foo;
+(a ^= 1) ?? foo;
+(a &= 1) ?? foo;
+undefined ?? foo;
+!bar ?? foo;
+void bar ?? foo;
+typeof bar ?? foo;
++bar ?? foo;
+-bar ?? foo;
+~bar ?? foo;
+++bar ?? foo;
+bar++ ?? foo;
+--bar ?? foo;
+bar-- ?? foo;
+(x == y) ?? foo;
+(x + y) ?? foo;
+(x / y) ?? foo;
+(x instanceof String) ?? foo;
+(x in y) ?? foo;
+Boolean(x) ?? foo;
+String(x) ?? foo;
+Number(x) ?? foo;
+
+// Binary expression with comparison to null
+({}) != null;
+({}) == null;
+null == ({});
+({}) == undefined;
+undefined == ({});
+
+// Binary expression with loose comparison to boolean
+({}) != true;
+({}) == true;
+([]) == true;
+([a, b]) == true;
+(() => {}) == true;
+(function() {}) == true;
+void foo == true;
+typeof foo == true;
+![] == true;
+true == class {};
+true == 1;
+undefined == true;
+true == undefined;
+`hello` == true;
+/[a-z]/ == true;
+({}) == Boolean({});
+({}) == Boolean();
+({}) == Boolean(() => {}, foo);
+
+// Binary expression with strict comparison to boolean
+({}) !== true;
+({}) == !({});
+({}) === true;
+([]) === true;
+(function() {}) === true;
+(() => {}) === true;
+!{} === true;
+typeof n === true;
+void n === true;
++n === true;
+-n === true;
+~n === true;
+true === true;
+1 === true;
+'hello' === true;
+/[a-z]/ === true;
+undefined === true;
+(a = {}) === true;
+(a += 1) === true;
+(a -= 1) === true;
+(a *= 1) === true;
+(a %= 1) === true;
+(a ** b) === true;
+(a << b) === true;
+(a >> b) === true;
+(a >>> b) === true;
+--a === true;
+a-- === true;
+++a === true;
+a++ === true;
+(a + b) === true;
+(a - b) === true;
+(a * b) === true;
+(a / b) === true;
+(a % b) === true;
+(a | b) === true;
+(a ^ b) === true;
+(a & b) === true;
+Boolean(0) === Boolean(1);
+true === String(x);
+true === Number(x);
+Boolean(0) == !({});
+
+// Binary expression with strict comparison to null
+({}) !== null;
+({}) === null;
+([]) === null;
+(() => {}) === null;
+(function() {}) === null;
+(class {}) === null;
+new Foo() === null;
+`` === null;
+1 === null;
+'hello' === null;
+/[a-z]/ === null;
+true === null;
+null === null;
+a++ === null;
+++a === null;
+--a === null;
+a-- === null;
+!a === null;
+typeof a === null;
+delete a.b === null;
+void a === null;
+undefined === null;
+(x = {}) === null;
+(x += y) === null;
+(x -= y) === null;
+(a, b, {}) === null;
+
+// Binary expression with strict comparison to undefined
+({}) !== undefined;
+({}) === undefined;
+([]) === undefined;
+(() => {}) === undefined;
+(function() {}) === undefined;
+(class {}) === undefined;
+new Foo() === undefined;
+`` === undefined;
+1 === undefined;
+'hello' === undefined;
+/[a-z]/ === undefined;
+true === undefined;
+null === undefined;
+a++ === undefined;
+++a === undefined;
+--a === undefined;
+a-- === undefined;
+!a === undefined;
+typeof a === undefined;
+delete a.b === undefined;
+void a === undefined;
+undefined === undefined;
+(x = {}) === undefined;
+(x += y) === undefined;
+(x -= y) === undefined;
+(a, b, {}) === undefined;
+
+/*
+ * If both sides are newly constructed objects, we can tell they will
+ * never be equal, even with == equality.
+ */
+[a] == [a];
+[a] != [a];
+({}) == [];
+
+// Comparing to always new objects
+x === {};
+x !== {};
+x === [];
+x === (() => {});
+x === (function() {});
+x === (class {});
+x === new Boolean();
+x === new Promise();
+x === new WeakSet();
+x === (foo, {});
+x === (y = {});
+x === (y ? {} : []);
+x === /[a-z]/;
+
+// It's not obvious what this does, but it compares the old value of `x` to the new object.
+x === (x = {});
+
+window.abc && false && anything;
+window.abc || true || anything;
+window.abc ?? 'non-nullish' ?? anything;
diff --git a/crates/biome_js_analyze/tests/specs/nursery/noConstantBinaryExpression/invalid.js.snap b/crates/biome_js_analyze/tests/specs/nursery/noConstantBinaryExpression/invalid.js.snap
new file mode 100644
index 000000000000..13623a1101a3
--- /dev/null
+++ b/crates/biome_js_analyze/tests/specs/nursery/noConstantBinaryExpression/invalid.js.snap
@@ -0,0 +1,4330 @@
+---
+source: crates/biome_js_analyze/tests/spec_tests.rs
+expression: invalid.js
+---
+# Input
+```js
+[] && greeting;
+[] || greeting;
+[] ?? greeting;
+[] == true;
+true == [];
+[] != true;
+[] === true;
+[] !== true;
+
+!foo == null;
+!foo ?? bar;
+(a + b) / 2 ?? bar;
+String(foo.bar) ?? baz;
+"hello" + name ?? "";
+[foo?.bar ?? ""] ?? [];
+
+// Logical expression with constant truthiness
+true && hello;
+true || hello;
+true && foo;
+'' && foo;
+100 && foo;
++100 && foo;
+-100 && foo;
+~100 && foo;
+/[a-z]/ && foo;
+Boolean([]) && foo;
+Boolean() && foo;
+Boolean([], n) && foo;
+({}) && foo;
+[] && foo;
+(() => {}) && foo;
+(function() {}) && foo;
+(class {}) && foo;
+(class { valueOf() { return x; } }) && foo;
+(class { [x]() { return x; } }) && foo;
+new Foo() && foo;
+
+// (boxed values are always truthy)
+new Boolean(unknown) && foo;
+(bar = false) && foo;
+(bar.baz = false) && foo;
+(bar[0] = false) && foo;
+`hello ${hello}` && foo;
+void bar && foo;
+!true && foo;
+typeof bar && foo;
+(bar, baz, true) && foo;
+undefined && foo;
+
+// Logical expression with constant nullishness
+({}) ?? foo;
+([]) ?? foo;
+(() => {}) ?? foo;
+(function() {}) ?? foo;
+(class {}) ?? foo;
+new Foo() ?? foo;
+1 ?? foo;
+/[a-z]/ ?? foo;
+`${''}` ?? foo;
+(a = true) ?? foo;
+(a += 1) ?? foo;
+(a -= 1) ?? foo;
+(a *= 1) ?? foo;
+(a /= 1) ?? foo;
+(a %= 1) ?? foo;
+(a <<= 1) ?? foo;
+(a >>= 1) ?? foo;
+(a >>>= 1) ?? foo;
+(a |= 1) ?? foo;
+(a ^= 1) ?? foo;
+(a &= 1) ?? foo;
+undefined ?? foo;
+!bar ?? foo;
+void bar ?? foo;
+typeof bar ?? foo;
++bar ?? foo;
+-bar ?? foo;
+~bar ?? foo;
+++bar ?? foo;
+bar++ ?? foo;
+--bar ?? foo;
+bar-- ?? foo;
+(x == y) ?? foo;
+(x + y) ?? foo;
+(x / y) ?? foo;
+(x instanceof String) ?? foo;
+(x in y) ?? foo;
+Boolean(x) ?? foo;
+String(x) ?? foo;
+Number(x) ?? foo;
+
+// Binary expression with comparison to null
+({}) != null;
+({}) == null;
+null == ({});
+({}) == undefined;
+undefined == ({});
+
+// Binary expression with loose comparison to boolean
+({}) != true;
+({}) == true;
+([]) == true;
+([a, b]) == true;
+(() => {}) == true;
+(function() {}) == true;
+void foo == true;
+typeof foo == true;
+![] == true;
+true == class {};
+true == 1;
+undefined == true;
+true == undefined;
+`hello` == true;
+/[a-z]/ == true;
+({}) == Boolean({});
+({}) == Boolean();
+({}) == Boolean(() => {}, foo);
+
+// Binary expression with strict comparison to boolean
+({}) !== true;
+({}) == !({});
+({}) === true;
+([]) === true;
+(function() {}) === true;
+(() => {}) === true;
+!{} === true;
+typeof n === true;
+void n === true;
++n === true;
+-n === true;
+~n === true;
+true === true;
+1 === true;
+'hello' === true;
+/[a-z]/ === true;
+undefined === true;
+(a = {}) === true;
+(a += 1) === true;
+(a -= 1) === true;
+(a *= 1) === true;
+(a %= 1) === true;
+(a ** b) === true;
+(a << b) === true;
+(a >> b) === true;
+(a >>> b) === true;
+--a === true;
+a-- === true;
+++a === true;
+a++ === true;
+(a + b) === true;
+(a - b) === true;
+(a * b) === true;
+(a / b) === true;
+(a % b) === true;
+(a | b) === true;
+(a ^ b) === true;
+(a & b) === true;
+Boolean(0) === Boolean(1);
+true === String(x);
+true === Number(x);
+Boolean(0) == !({});
+
+// Binary expression with strict comparison to null
+({}) !== null;
+({}) === null;
+([]) === null;
+(() => {}) === null;
+(function() {}) === null;
+(class {}) === null;
+new Foo() === null;
+`` === null;
+1 === null;
+'hello' === null;
+/[a-z]/ === null;
+true === null;
+null === null;
+a++ === null;
+++a === null;
+--a === null;
+a-- === null;
+!a === null;
+typeof a === null;
+delete a.b === null;
+void a === null;
+undefined === null;
+(x = {}) === null;
+(x += y) === null;
+(x -= y) === null;
+(a, b, {}) === null;
+
+// Binary expression with strict comparison to undefined
+({}) !== undefined;
+({}) === undefined;
+([]) === undefined;
+(() => {}) === undefined;
+(function() {}) === undefined;
+(class {}) === undefined;
+new Foo() === undefined;
+`` === undefined;
+1 === undefined;
+'hello' === undefined;
+/[a-z]/ === undefined;
+true === undefined;
+null === undefined;
+a++ === undefined;
+++a === undefined;
+--a === undefined;
+a-- === undefined;
+!a === undefined;
+typeof a === undefined;
+delete a.b === undefined;
+void a === undefined;
+undefined === undefined;
+(x = {}) === undefined;
+(x += y) === undefined;
+(x -= y) === undefined;
+(a, b, {}) === undefined;
+
+/*
+ * If both sides are newly constructed objects, we can tell they will
+ * never be equal, even with == equality.
+ */
+[a] == [a];
+[a] != [a];
+({}) == [];
+
+// Comparing to always new objects
+x === {};
+x !== {};
+x === [];
+x === (() => {});
+x === (function() {});
+x === (class {});
+x === new Boolean();
+x === new Promise();
+x === new WeakSet();
+x === (foo, {});
+x === (y = {});
+x === (y ? {} : []);
+x === /[a-z]/;
+
+// It's not obvious what this does, but it compares the old value of `x` to the new object.
+x === (x = {});
+
+window.abc && false && anything;
+window.abc || true || anything;
+window.abc ?? 'non-nullish' ?? anything;
+
+```
+
+# Diagnostics
+```
+invalid.js:1:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+  > 1 │ [] && greeting;
+      │ ^^^^^^^^^^^^^^
+    2 │ [] || greeting;
+    3 │ [] ?? greeting;
+  
+  i This operand always evaluates to the same truthiness.
+  
+  > 1 │ [] && greeting;
+      │ ^^
+    2 │ [] || greeting;
+    3 │ [] ?? greeting;
+  
+
+```
+
+```
+invalid.js:2:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    1 │ [] && greeting;
+  > 2 │ [] || greeting;
+      │ ^^^^^^^^^^^^^^
+    3 │ [] ?? greeting;
+    4 │ [] == true;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    1 │ [] && greeting;
+  > 2 │ [] || greeting;
+      │ ^^
+    3 │ [] ?? greeting;
+    4 │ [] == true;
+  
+
+```
+
+```
+invalid.js:3:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    1 │ [] && greeting;
+    2 │ [] || greeting;
+  > 3 │ [] ?? greeting;
+      │ ^^^^^^^^^^^^^^
+    4 │ [] == true;
+    5 │ true == [];
+  
+  i This operand always evaluates to the same nullishness.
+  
+    1 │ [] && greeting;
+    2 │ [] || greeting;
+  > 3 │ [] ?? greeting;
+      │ ^^
+    4 │ [] == true;
+    5 │ true == [];
+  
+
+```
+
+```
+invalid.js:4:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    2 │ [] || greeting;
+    3 │ [] ?? greeting;
+  > 4 │ [] == true;
+      │ ^^^^^^^^^^
+    5 │ true == [];
+    6 │ [] != true;
+  
+
+```
+
+```
+invalid.js:5:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    3 │ [] ?? greeting;
+    4 │ [] == true;
+  > 5 │ true == [];
+      │ ^^^^^^^^^^
+    6 │ [] != true;
+    7 │ [] === true;
+  
+
+```
+
+```
+invalid.js:6:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    4 │ [] == true;
+    5 │ true == [];
+  > 6 │ [] != true;
+      │ ^^^^^^^^^^
+    7 │ [] === true;
+    8 │ [] !== true;
+  
+
+```
+
+```
+invalid.js:7:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    5 │ true == [];
+    6 │ [] != true;
+  > 7 │ [] === true;
+      │ ^^^^^^^^^^^
+    8 │ [] !== true;
+    9 │ 
+  
+
+```
+
+```
+invalid.js:8:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+     6 │ [] != true;
+     7 │ [] === true;
+   > 8 │ [] !== true;
+       │ ^^^^^^^^^^^
+     9 │ 
+    10 │ !foo == null;
+  
+
+```
+
+```
+invalid.js:10:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+     8 │ [] !== true;
+     9 │ 
+  > 10 │ !foo == null;
+       │ ^^^^^^^^^^^^
+    11 │ !foo ?? bar;
+    12 │ (a + b) / 2 ?? bar;
+  
+
+```
+
+```
+invalid.js:11:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    10 │ !foo == null;
+  > 11 │ !foo ?? bar;
+       │ ^^^^^^^^^^^
+    12 │ (a + b) / 2 ?? bar;
+    13 │ String(foo.bar) ?? baz;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    10 │ !foo == null;
+  > 11 │ !foo ?? bar;
+       │ ^^^^
+    12 │ (a + b) / 2 ?? bar;
+    13 │ String(foo.bar) ?? baz;
+  
+
+```
+
+```
+invalid.js:12:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    10 │ !foo == null;
+    11 │ !foo ?? bar;
+  > 12 │ (a + b) / 2 ?? bar;
+       │ ^^^^^^^^^^^^^^^^^^
+    13 │ String(foo.bar) ?? baz;
+    14 │ "hello" + name ?? "";
+  
+  i This operand always evaluates to the same nullishness.
+  
+    10 │ !foo == null;
+    11 │ !foo ?? bar;
+  > 12 │ (a + b) / 2 ?? bar;
+       │ ^^^^^^^^^^^
+    13 │ String(foo.bar) ?? baz;
+    14 │ "hello" + name ?? "";
+  
+
+```
+
+```
+invalid.js:13:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    11 │ !foo ?? bar;
+    12 │ (a + b) / 2 ?? bar;
+  > 13 │ String(foo.bar) ?? baz;
+       │ ^^^^^^^^^^^^^^^^^^^^^^
+    14 │ "hello" + name ?? "";
+    15 │ [foo?.bar ?? ""] ?? [];
+  
+  i This operand always evaluates to the same nullishness.
+  
+    11 │ !foo ?? bar;
+    12 │ (a + b) / 2 ?? bar;
+  > 13 │ String(foo.bar) ?? baz;
+       │ ^^^^^^^^^^^^^^^
+    14 │ "hello" + name ?? "";
+    15 │ [foo?.bar ?? ""] ?? [];
+  
+
+```
+
+```
+invalid.js:14:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    12 │ (a + b) / 2 ?? bar;
+    13 │ String(foo.bar) ?? baz;
+  > 14 │ "hello" + name ?? "";
+       │ ^^^^^^^^^^^^^^^^^^^^
+    15 │ [foo?.bar ?? ""] ?? [];
+    16 │ 
+  
+  i This operand always evaluates to the same nullishness.
+  
+    12 │ (a + b) / 2 ?? bar;
+    13 │ String(foo.bar) ?? baz;
+  > 14 │ "hello" + name ?? "";
+       │ ^^^^^^^^^^^^^^
+    15 │ [foo?.bar ?? ""] ?? [];
+    16 │ 
+  
+
+```
+
+```
+invalid.js:15:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    13 │ String(foo.bar) ?? baz;
+    14 │ "hello" + name ?? "";
+  > 15 │ [foo?.bar ?? ""] ?? [];
+       │ ^^^^^^^^^^^^^^^^^^^^^^
+    16 │ 
+    17 │ // Logical expression with constant truthiness
+  
+  i This operand always evaluates to the same nullishness.
+  
+    13 │ String(foo.bar) ?? baz;
+    14 │ "hello" + name ?? "";
+  > 15 │ [foo?.bar ?? ""] ?? [];
+       │ ^^^^^^^^^^^^^^^^
+    16 │ 
+    17 │ // Logical expression with constant truthiness
+  
+
+```
+
+```
+invalid.js:18:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    17 │ // Logical expression with constant truthiness
+  > 18 │ true && hello;
+       │ ^^^^^^^^^^^^^
+    19 │ true || hello;
+    20 │ true && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    17 │ // Logical expression with constant truthiness
+  > 18 │ true && hello;
+       │ ^^^^
+    19 │ true || hello;
+    20 │ true && foo;
+  
+
+```
+
+```
+invalid.js:19:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    17 │ // Logical expression with constant truthiness
+    18 │ true && hello;
+  > 19 │ true || hello;
+       │ ^^^^^^^^^^^^^
+    20 │ true && foo;
+    21 │ '' && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    17 │ // Logical expression with constant truthiness
+    18 │ true && hello;
+  > 19 │ true || hello;
+       │ ^^^^
+    20 │ true && foo;
+    21 │ '' && foo;
+  
+
+```
+
+```
+invalid.js:20:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    18 │ true && hello;
+    19 │ true || hello;
+  > 20 │ true && foo;
+       │ ^^^^^^^^^^^
+    21 │ '' && foo;
+    22 │ 100 && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    18 │ true && hello;
+    19 │ true || hello;
+  > 20 │ true && foo;
+       │ ^^^^
+    21 │ '' && foo;
+    22 │ 100 && foo;
+  
+
+```
+
+```
+invalid.js:21:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    19 │ true || hello;
+    20 │ true && foo;
+  > 21 │ '' && foo;
+       │ ^^^^^^^^^
+    22 │ 100 && foo;
+    23 │ +100 && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    19 │ true || hello;
+    20 │ true && foo;
+  > 21 │ '' && foo;
+       │ ^^
+    22 │ 100 && foo;
+    23 │ +100 && foo;
+  
+
+```
+
+```
+invalid.js:22:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    20 │ true && foo;
+    21 │ '' && foo;
+  > 22 │ 100 && foo;
+       │ ^^^^^^^^^^
+    23 │ +100 && foo;
+    24 │ -100 && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    20 │ true && foo;
+    21 │ '' && foo;
+  > 22 │ 100 && foo;
+       │ ^^^
+    23 │ +100 && foo;
+    24 │ -100 && foo;
+  
+
+```
+
+```
+invalid.js:23:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    21 │ '' && foo;
+    22 │ 100 && foo;
+  > 23 │ +100 && foo;
+       │ ^^^^^^^^^^^
+    24 │ -100 && foo;
+    25 │ ~100 && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    21 │ '' && foo;
+    22 │ 100 && foo;
+  > 23 │ +100 && foo;
+       │ ^^^^
+    24 │ -100 && foo;
+    25 │ ~100 && foo;
+  
+
+```
+
+```
+invalid.js:24:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    22 │ 100 && foo;
+    23 │ +100 && foo;
+  > 24 │ -100 && foo;
+       │ ^^^^^^^^^^^
+    25 │ ~100 && foo;
+    26 │ /[a-z]/ && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    22 │ 100 && foo;
+    23 │ +100 && foo;
+  > 24 │ -100 && foo;
+       │ ^^^^
+    25 │ ~100 && foo;
+    26 │ /[a-z]/ && foo;
+  
+
+```
+
+```
+invalid.js:25:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    23 │ +100 && foo;
+    24 │ -100 && foo;
+  > 25 │ ~100 && foo;
+       │ ^^^^^^^^^^^
+    26 │ /[a-z]/ && foo;
+    27 │ Boolean([]) && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    23 │ +100 && foo;
+    24 │ -100 && foo;
+  > 25 │ ~100 && foo;
+       │ ^^^^
+    26 │ /[a-z]/ && foo;
+    27 │ Boolean([]) && foo;
+  
+
+```
+
+```
+invalid.js:26:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    24 │ -100 && foo;
+    25 │ ~100 && foo;
+  > 26 │ /[a-z]/ && foo;
+       │ ^^^^^^^^^^^^^^
+    27 │ Boolean([]) && foo;
+    28 │ Boolean() && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    24 │ -100 && foo;
+    25 │ ~100 && foo;
+  > 26 │ /[a-z]/ && foo;
+       │ ^^^^^^^
+    27 │ Boolean([]) && foo;
+    28 │ Boolean() && foo;
+  
+
+```
+
+```
+invalid.js:27:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    25 │ ~100 && foo;
+    26 │ /[a-z]/ && foo;
+  > 27 │ Boolean([]) && foo;
+       │ ^^^^^^^^^^^^^^^^^^
+    28 │ Boolean() && foo;
+    29 │ Boolean([], n) && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    25 │ ~100 && foo;
+    26 │ /[a-z]/ && foo;
+  > 27 │ Boolean([]) && foo;
+       │ ^^^^^^^^^^^
+    28 │ Boolean() && foo;
+    29 │ Boolean([], n) && foo;
+  
+
+```
+
+```
+invalid.js:28:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    26 │ /[a-z]/ && foo;
+    27 │ Boolean([]) && foo;
+  > 28 │ Boolean() && foo;
+       │ ^^^^^^^^^^^^^^^^
+    29 │ Boolean([], n) && foo;
+    30 │ ({}) && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    26 │ /[a-z]/ && foo;
+    27 │ Boolean([]) && foo;
+  > 28 │ Boolean() && foo;
+       │ ^^^^^^^^^
+    29 │ Boolean([], n) && foo;
+    30 │ ({}) && foo;
+  
+
+```
+
+```
+invalid.js:29:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    27 │ Boolean([]) && foo;
+    28 │ Boolean() && foo;
+  > 29 │ Boolean([], n) && foo;
+       │ ^^^^^^^^^^^^^^^^^^^^^
+    30 │ ({}) && foo;
+    31 │ [] && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    27 │ Boolean([]) && foo;
+    28 │ Boolean() && foo;
+  > 29 │ Boolean([], n) && foo;
+       │ ^^^^^^^^^^^^^^
+    30 │ ({}) && foo;
+    31 │ [] && foo;
+  
+
+```
+
+```
+invalid.js:30:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    28 │ Boolean() && foo;
+    29 │ Boolean([], n) && foo;
+  > 30 │ ({}) && foo;
+       │ ^^^^^^^^^^^
+    31 │ [] && foo;
+    32 │ (() => {}) && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    28 │ Boolean() && foo;
+    29 │ Boolean([], n) && foo;
+  > 30 │ ({}) && foo;
+       │ ^^^^
+    31 │ [] && foo;
+    32 │ (() => {}) && foo;
+  
+
+```
+
+```
+invalid.js:31:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    29 │ Boolean([], n) && foo;
+    30 │ ({}) && foo;
+  > 31 │ [] && foo;
+       │ ^^^^^^^^^
+    32 │ (() => {}) && foo;
+    33 │ (function() {}) && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    29 │ Boolean([], n) && foo;
+    30 │ ({}) && foo;
+  > 31 │ [] && foo;
+       │ ^^
+    32 │ (() => {}) && foo;
+    33 │ (function() {}) && foo;
+  
+
+```
+
+```
+invalid.js:32:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    30 │ ({}) && foo;
+    31 │ [] && foo;
+  > 32 │ (() => {}) && foo;
+       │ ^^^^^^^^^^^^^^^^^
+    33 │ (function() {}) && foo;
+    34 │ (class {}) && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    30 │ ({}) && foo;
+    31 │ [] && foo;
+  > 32 │ (() => {}) && foo;
+       │ ^^^^^^^^^^
+    33 │ (function() {}) && foo;
+    34 │ (class {}) && foo;
+  
+
+```
+
+```
+invalid.js:33:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    31 │ [] && foo;
+    32 │ (() => {}) && foo;
+  > 33 │ (function() {}) && foo;
+       │ ^^^^^^^^^^^^^^^^^^^^^^
+    34 │ (class {}) && foo;
+    35 │ (class { valueOf() { return x; } }) && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    31 │ [] && foo;
+    32 │ (() => {}) && foo;
+  > 33 │ (function() {}) && foo;
+       │ ^^^^^^^^^^^^^^^
+    34 │ (class {}) && foo;
+    35 │ (class { valueOf() { return x; } }) && foo;
+  
+
+```
+
+```
+invalid.js:34:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    32 │ (() => {}) && foo;
+    33 │ (function() {}) && foo;
+  > 34 │ (class {}) && foo;
+       │ ^^^^^^^^^^^^^^^^^
+    35 │ (class { valueOf() { return x; } }) && foo;
+    36 │ (class { [x]() { return x; } }) && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    32 │ (() => {}) && foo;
+    33 │ (function() {}) && foo;
+  > 34 │ (class {}) && foo;
+       │ ^^^^^^^^^^
+    35 │ (class { valueOf() { return x; } }) && foo;
+    36 │ (class { [x]() { return x; } }) && foo;
+  
+
+```
+
+```
+invalid.js:35:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    33 │ (function() {}) && foo;
+    34 │ (class {}) && foo;
+  > 35 │ (class { valueOf() { return x; } }) && foo;
+       │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    36 │ (class { [x]() { return x; } }) && foo;
+    37 │ new Foo() && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    33 │ (function() {}) && foo;
+    34 │ (class {}) && foo;
+  > 35 │ (class { valueOf() { return x; } }) && foo;
+       │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    36 │ (class { [x]() { return x; } }) && foo;
+    37 │ new Foo() && foo;
+  
+
+```
+
+```
+invalid.js:36:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    34 │ (class {}) && foo;
+    35 │ (class { valueOf() { return x; } }) && foo;
+  > 36 │ (class { [x]() { return x; } }) && foo;
+       │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    37 │ new Foo() && foo;
+    38 │ 
+  
+  i This operand always evaluates to the same truthiness.
+  
+    34 │ (class {}) && foo;
+    35 │ (class { valueOf() { return x; } }) && foo;
+  > 36 │ (class { [x]() { return x; } }) && foo;
+       │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    37 │ new Foo() && foo;
+    38 │ 
+  
+
+```
+
+```
+invalid.js:37:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    35 │ (class { valueOf() { return x; } }) && foo;
+    36 │ (class { [x]() { return x; } }) && foo;
+  > 37 │ new Foo() && foo;
+       │ ^^^^^^^^^^^^^^^^
+    38 │ 
+    39 │ // (boxed values are always truthy)
+  
+  i This operand always evaluates to the same truthiness.
+  
+    35 │ (class { valueOf() { return x; } }) && foo;
+    36 │ (class { [x]() { return x; } }) && foo;
+  > 37 │ new Foo() && foo;
+       │ ^^^^^^^^^
+    38 │ 
+    39 │ // (boxed values are always truthy)
+  
+
+```
+
+```
+invalid.js:40:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    39 │ // (boxed values are always truthy)
+  > 40 │ new Boolean(unknown) && foo;
+       │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    41 │ (bar = false) && foo;
+    42 │ (bar.baz = false) && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    39 │ // (boxed values are always truthy)
+  > 40 │ new Boolean(unknown) && foo;
+       │ ^^^^^^^^^^^^^^^^^^^^
+    41 │ (bar = false) && foo;
+    42 │ (bar.baz = false) && foo;
+  
+
+```
+
+```
+invalid.js:41:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    39 │ // (boxed values are always truthy)
+    40 │ new Boolean(unknown) && foo;
+  > 41 │ (bar = false) && foo;
+       │ ^^^^^^^^^^^^^^^^^^^^
+    42 │ (bar.baz = false) && foo;
+    43 │ (bar[0] = false) && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    39 │ // (boxed values are always truthy)
+    40 │ new Boolean(unknown) && foo;
+  > 41 │ (bar = false) && foo;
+       │ ^^^^^^^^^^^^^
+    42 │ (bar.baz = false) && foo;
+    43 │ (bar[0] = false) && foo;
+  
+
+```
+
+```
+invalid.js:42:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    40 │ new Boolean(unknown) && foo;
+    41 │ (bar = false) && foo;
+  > 42 │ (bar.baz = false) && foo;
+       │ ^^^^^^^^^^^^^^^^^^^^^^^^
+    43 │ (bar[0] = false) && foo;
+    44 │ `hello ${hello}` && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    40 │ new Boolean(unknown) && foo;
+    41 │ (bar = false) && foo;
+  > 42 │ (bar.baz = false) && foo;
+       │ ^^^^^^^^^^^^^^^^^
+    43 │ (bar[0] = false) && foo;
+    44 │ `hello ${hello}` && foo;
+  
+
+```
+
+```
+invalid.js:43:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    41 │ (bar = false) && foo;
+    42 │ (bar.baz = false) && foo;
+  > 43 │ (bar[0] = false) && foo;
+       │ ^^^^^^^^^^^^^^^^^^^^^^^
+    44 │ `hello ${hello}` && foo;
+    45 │ void bar && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    41 │ (bar = false) && foo;
+    42 │ (bar.baz = false) && foo;
+  > 43 │ (bar[0] = false) && foo;
+       │ ^^^^^^^^^^^^^^^^
+    44 │ `hello ${hello}` && foo;
+    45 │ void bar && foo;
+  
+
+```
+
+```
+invalid.js:44:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    42 │ (bar.baz = false) && foo;
+    43 │ (bar[0] = false) && foo;
+  > 44 │ `hello ${hello}` && foo;
+       │ ^^^^^^^^^^^^^^^^^^^^^^^
+    45 │ void bar && foo;
+    46 │ !true && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    42 │ (bar.baz = false) && foo;
+    43 │ (bar[0] = false) && foo;
+  > 44 │ `hello ${hello}` && foo;
+       │ ^^^^^^^^^^^^^^^^
+    45 │ void bar && foo;
+    46 │ !true && foo;
+  
+
+```
+
+```
+invalid.js:45:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    43 │ (bar[0] = false) && foo;
+    44 │ `hello ${hello}` && foo;
+  > 45 │ void bar && foo;
+       │ ^^^^^^^^^^^^^^^
+    46 │ !true && foo;
+    47 │ typeof bar && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    43 │ (bar[0] = false) && foo;
+    44 │ `hello ${hello}` && foo;
+  > 45 │ void bar && foo;
+       │ ^^^^^^^^
+    46 │ !true && foo;
+    47 │ typeof bar && foo;
+  
+
+```
+
+```
+invalid.js:46:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    44 │ `hello ${hello}` && foo;
+    45 │ void bar && foo;
+  > 46 │ !true && foo;
+       │ ^^^^^^^^^^^^
+    47 │ typeof bar && foo;
+    48 │ (bar, baz, true) && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    44 │ `hello ${hello}` && foo;
+    45 │ void bar && foo;
+  > 46 │ !true && foo;
+       │ ^^^^^
+    47 │ typeof bar && foo;
+    48 │ (bar, baz, true) && foo;
+  
+
+```
+
+```
+invalid.js:47:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    45 │ void bar && foo;
+    46 │ !true && foo;
+  > 47 │ typeof bar && foo;
+       │ ^^^^^^^^^^^^^^^^^
+    48 │ (bar, baz, true) && foo;
+    49 │ undefined && foo;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    45 │ void bar && foo;
+    46 │ !true && foo;
+  > 47 │ typeof bar && foo;
+       │ ^^^^^^^^^^
+    48 │ (bar, baz, true) && foo;
+    49 │ undefined && foo;
+  
+
+```
+
+```
+invalid.js:48:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    46 │ !true && foo;
+    47 │ typeof bar && foo;
+  > 48 │ (bar, baz, true) && foo;
+       │ ^^^^^^^^^^^^^^^^^^^^^^^
+    49 │ undefined && foo;
+    50 │ 
+  
+  i This operand always evaluates to the same truthiness.
+  
+    46 │ !true && foo;
+    47 │ typeof bar && foo;
+  > 48 │ (bar, baz, true) && foo;
+       │ ^^^^^^^^^^^^^^^^
+    49 │ undefined && foo;
+    50 │ 
+  
+
+```
+
+```
+invalid.js:49:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    47 │ typeof bar && foo;
+    48 │ (bar, baz, true) && foo;
+  > 49 │ undefined && foo;
+       │ ^^^^^^^^^^^^^^^^
+    50 │ 
+    51 │ // Logical expression with constant nullishness
+  
+  i This operand always evaluates to the same truthiness.
+  
+    47 │ typeof bar && foo;
+    48 │ (bar, baz, true) && foo;
+  > 49 │ undefined && foo;
+       │ ^^^^^^^^^
+    50 │ 
+    51 │ // Logical expression with constant nullishness
+  
+
+```
+
+```
+invalid.js:52:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    51 │ // Logical expression with constant nullishness
+  > 52 │ ({}) ?? foo;
+       │ ^^^^^^^^^^^
+    53 │ ([]) ?? foo;
+    54 │ (() => {}) ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    51 │ // Logical expression with constant nullishness
+  > 52 │ ({}) ?? foo;
+       │ ^^^^
+    53 │ ([]) ?? foo;
+    54 │ (() => {}) ?? foo;
+  
+
+```
+
+```
+invalid.js:53:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    51 │ // Logical expression with constant nullishness
+    52 │ ({}) ?? foo;
+  > 53 │ ([]) ?? foo;
+       │ ^^^^^^^^^^^
+    54 │ (() => {}) ?? foo;
+    55 │ (function() {}) ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    51 │ // Logical expression with constant nullishness
+    52 │ ({}) ?? foo;
+  > 53 │ ([]) ?? foo;
+       │ ^^^^
+    54 │ (() => {}) ?? foo;
+    55 │ (function() {}) ?? foo;
+  
+
+```
+
+```
+invalid.js:54:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    52 │ ({}) ?? foo;
+    53 │ ([]) ?? foo;
+  > 54 │ (() => {}) ?? foo;
+       │ ^^^^^^^^^^^^^^^^^
+    55 │ (function() {}) ?? foo;
+    56 │ (class {}) ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    52 │ ({}) ?? foo;
+    53 │ ([]) ?? foo;
+  > 54 │ (() => {}) ?? foo;
+       │ ^^^^^^^^^^
+    55 │ (function() {}) ?? foo;
+    56 │ (class {}) ?? foo;
+  
+
+```
+
+```
+invalid.js:55:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    53 │ ([]) ?? foo;
+    54 │ (() => {}) ?? foo;
+  > 55 │ (function() {}) ?? foo;
+       │ ^^^^^^^^^^^^^^^^^^^^^^
+    56 │ (class {}) ?? foo;
+    57 │ new Foo() ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    53 │ ([]) ?? foo;
+    54 │ (() => {}) ?? foo;
+  > 55 │ (function() {}) ?? foo;
+       │ ^^^^^^^^^^^^^^^
+    56 │ (class {}) ?? foo;
+    57 │ new Foo() ?? foo;
+  
+
+```
+
+```
+invalid.js:56:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    54 │ (() => {}) ?? foo;
+    55 │ (function() {}) ?? foo;
+  > 56 │ (class {}) ?? foo;
+       │ ^^^^^^^^^^^^^^^^^
+    57 │ new Foo() ?? foo;
+    58 │ 1 ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    54 │ (() => {}) ?? foo;
+    55 │ (function() {}) ?? foo;
+  > 56 │ (class {}) ?? foo;
+       │ ^^^^^^^^^^
+    57 │ new Foo() ?? foo;
+    58 │ 1 ?? foo;
+  
+
+```
+
+```
+invalid.js:57:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    55 │ (function() {}) ?? foo;
+    56 │ (class {}) ?? foo;
+  > 57 │ new Foo() ?? foo;
+       │ ^^^^^^^^^^^^^^^^
+    58 │ 1 ?? foo;
+    59 │ /[a-z]/ ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    55 │ (function() {}) ?? foo;
+    56 │ (class {}) ?? foo;
+  > 57 │ new Foo() ?? foo;
+       │ ^^^^^^^^^
+    58 │ 1 ?? foo;
+    59 │ /[a-z]/ ?? foo;
+  
+
+```
+
+```
+invalid.js:58:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    56 │ (class {}) ?? foo;
+    57 │ new Foo() ?? foo;
+  > 58 │ 1 ?? foo;
+       │ ^^^^^^^^
+    59 │ /[a-z]/ ?? foo;
+    60 │ `${''}` ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    56 │ (class {}) ?? foo;
+    57 │ new Foo() ?? foo;
+  > 58 │ 1 ?? foo;
+       │ ^
+    59 │ /[a-z]/ ?? foo;
+    60 │ `${''}` ?? foo;
+  
+
+```
+
+```
+invalid.js:59:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    57 │ new Foo() ?? foo;
+    58 │ 1 ?? foo;
+  > 59 │ /[a-z]/ ?? foo;
+       │ ^^^^^^^^^^^^^^
+    60 │ `${''}` ?? foo;
+    61 │ (a = true) ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    57 │ new Foo() ?? foo;
+    58 │ 1 ?? foo;
+  > 59 │ /[a-z]/ ?? foo;
+       │ ^^^^^^^
+    60 │ `${''}` ?? foo;
+    61 │ (a = true) ?? foo;
+  
+
+```
+
+```
+invalid.js:60:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    58 │ 1 ?? foo;
+    59 │ /[a-z]/ ?? foo;
+  > 60 │ `${''}` ?? foo;
+       │ ^^^^^^^^^^^^^^
+    61 │ (a = true) ?? foo;
+    62 │ (a += 1) ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    58 │ 1 ?? foo;
+    59 │ /[a-z]/ ?? foo;
+  > 60 │ `${''}` ?? foo;
+       │ ^^^^^^^
+    61 │ (a = true) ?? foo;
+    62 │ (a += 1) ?? foo;
+  
+
+```
+
+```
+invalid.js:61:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    59 │ /[a-z]/ ?? foo;
+    60 │ `${''}` ?? foo;
+  > 61 │ (a = true) ?? foo;
+       │ ^^^^^^^^^^^^^^^^^
+    62 │ (a += 1) ?? foo;
+    63 │ (a -= 1) ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    59 │ /[a-z]/ ?? foo;
+    60 │ `${''}` ?? foo;
+  > 61 │ (a = true) ?? foo;
+       │ ^^^^^^^^^^
+    62 │ (a += 1) ?? foo;
+    63 │ (a -= 1) ?? foo;
+  
+
+```
+
+```
+invalid.js:62:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    60 │ `${''}` ?? foo;
+    61 │ (a = true) ?? foo;
+  > 62 │ (a += 1) ?? foo;
+       │ ^^^^^^^^^^^^^^^
+    63 │ (a -= 1) ?? foo;
+    64 │ (a *= 1) ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    60 │ `${''}` ?? foo;
+    61 │ (a = true) ?? foo;
+  > 62 │ (a += 1) ?? foo;
+       │ ^^^^^^^^
+    63 │ (a -= 1) ?? foo;
+    64 │ (a *= 1) ?? foo;
+  
+
+```
+
+```
+invalid.js:63:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    61 │ (a = true) ?? foo;
+    62 │ (a += 1) ?? foo;
+  > 63 │ (a -= 1) ?? foo;
+       │ ^^^^^^^^^^^^^^^
+    64 │ (a *= 1) ?? foo;
+    65 │ (a /= 1) ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    61 │ (a = true) ?? foo;
+    62 │ (a += 1) ?? foo;
+  > 63 │ (a -= 1) ?? foo;
+       │ ^^^^^^^^
+    64 │ (a *= 1) ?? foo;
+    65 │ (a /= 1) ?? foo;
+  
+
+```
+
+```
+invalid.js:64:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    62 │ (a += 1) ?? foo;
+    63 │ (a -= 1) ?? foo;
+  > 64 │ (a *= 1) ?? foo;
+       │ ^^^^^^^^^^^^^^^
+    65 │ (a /= 1) ?? foo;
+    66 │ (a %= 1) ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    62 │ (a += 1) ?? foo;
+    63 │ (a -= 1) ?? foo;
+  > 64 │ (a *= 1) ?? foo;
+       │ ^^^^^^^^
+    65 │ (a /= 1) ?? foo;
+    66 │ (a %= 1) ?? foo;
+  
+
+```
+
+```
+invalid.js:65:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    63 │ (a -= 1) ?? foo;
+    64 │ (a *= 1) ?? foo;
+  > 65 │ (a /= 1) ?? foo;
+       │ ^^^^^^^^^^^^^^^
+    66 │ (a %= 1) ?? foo;
+    67 │ (a <<= 1) ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    63 │ (a -= 1) ?? foo;
+    64 │ (a *= 1) ?? foo;
+  > 65 │ (a /= 1) ?? foo;
+       │ ^^^^^^^^
+    66 │ (a %= 1) ?? foo;
+    67 │ (a <<= 1) ?? foo;
+  
+
+```
+
+```
+invalid.js:66:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    64 │ (a *= 1) ?? foo;
+    65 │ (a /= 1) ?? foo;
+  > 66 │ (a %= 1) ?? foo;
+       │ ^^^^^^^^^^^^^^^
+    67 │ (a <<= 1) ?? foo;
+    68 │ (a >>= 1) ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    64 │ (a *= 1) ?? foo;
+    65 │ (a /= 1) ?? foo;
+  > 66 │ (a %= 1) ?? foo;
+       │ ^^^^^^^^
+    67 │ (a <<= 1) ?? foo;
+    68 │ (a >>= 1) ?? foo;
+  
+
+```
+
+```
+invalid.js:67:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    65 │ (a /= 1) ?? foo;
+    66 │ (a %= 1) ?? foo;
+  > 67 │ (a <<= 1) ?? foo;
+       │ ^^^^^^^^^^^^^^^^
+    68 │ (a >>= 1) ?? foo;
+    69 │ (a >>>= 1) ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    65 │ (a /= 1) ?? foo;
+    66 │ (a %= 1) ?? foo;
+  > 67 │ (a <<= 1) ?? foo;
+       │ ^^^^^^^^^
+    68 │ (a >>= 1) ?? foo;
+    69 │ (a >>>= 1) ?? foo;
+  
+
+```
+
+```
+invalid.js:68:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    66 │ (a %= 1) ?? foo;
+    67 │ (a <<= 1) ?? foo;
+  > 68 │ (a >>= 1) ?? foo;
+       │ ^^^^^^^^^^^^^^^^
+    69 │ (a >>>= 1) ?? foo;
+    70 │ (a |= 1) ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    66 │ (a %= 1) ?? foo;
+    67 │ (a <<= 1) ?? foo;
+  > 68 │ (a >>= 1) ?? foo;
+       │ ^^^^^^^^^
+    69 │ (a >>>= 1) ?? foo;
+    70 │ (a |= 1) ?? foo;
+  
+
+```
+
+```
+invalid.js:69:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    67 │ (a <<= 1) ?? foo;
+    68 │ (a >>= 1) ?? foo;
+  > 69 │ (a >>>= 1) ?? foo;
+       │ ^^^^^^^^^^^^^^^^^
+    70 │ (a |= 1) ?? foo;
+    71 │ (a ^= 1) ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    67 │ (a <<= 1) ?? foo;
+    68 │ (a >>= 1) ?? foo;
+  > 69 │ (a >>>= 1) ?? foo;
+       │ ^^^^^^^^^^
+    70 │ (a |= 1) ?? foo;
+    71 │ (a ^= 1) ?? foo;
+  
+
+```
+
+```
+invalid.js:70:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    68 │ (a >>= 1) ?? foo;
+    69 │ (a >>>= 1) ?? foo;
+  > 70 │ (a |= 1) ?? foo;
+       │ ^^^^^^^^^^^^^^^
+    71 │ (a ^= 1) ?? foo;
+    72 │ (a &= 1) ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    68 │ (a >>= 1) ?? foo;
+    69 │ (a >>>= 1) ?? foo;
+  > 70 │ (a |= 1) ?? foo;
+       │ ^^^^^^^^
+    71 │ (a ^= 1) ?? foo;
+    72 │ (a &= 1) ?? foo;
+  
+
+```
+
+```
+invalid.js:71:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    69 │ (a >>>= 1) ?? foo;
+    70 │ (a |= 1) ?? foo;
+  > 71 │ (a ^= 1) ?? foo;
+       │ ^^^^^^^^^^^^^^^
+    72 │ (a &= 1) ?? foo;
+    73 │ undefined ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    69 │ (a >>>= 1) ?? foo;
+    70 │ (a |= 1) ?? foo;
+  > 71 │ (a ^= 1) ?? foo;
+       │ ^^^^^^^^
+    72 │ (a &= 1) ?? foo;
+    73 │ undefined ?? foo;
+  
+
+```
+
+```
+invalid.js:72:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    70 │ (a |= 1) ?? foo;
+    71 │ (a ^= 1) ?? foo;
+  > 72 │ (a &= 1) ?? foo;
+       │ ^^^^^^^^^^^^^^^
+    73 │ undefined ?? foo;
+    74 │ !bar ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    70 │ (a |= 1) ?? foo;
+    71 │ (a ^= 1) ?? foo;
+  > 72 │ (a &= 1) ?? foo;
+       │ ^^^^^^^^
+    73 │ undefined ?? foo;
+    74 │ !bar ?? foo;
+  
+
+```
+
+```
+invalid.js:73:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    71 │ (a ^= 1) ?? foo;
+    72 │ (a &= 1) ?? foo;
+  > 73 │ undefined ?? foo;
+       │ ^^^^^^^^^^^^^^^^
+    74 │ !bar ?? foo;
+    75 │ void bar ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    71 │ (a ^= 1) ?? foo;
+    72 │ (a &= 1) ?? foo;
+  > 73 │ undefined ?? foo;
+       │ ^^^^^^^^^
+    74 │ !bar ?? foo;
+    75 │ void bar ?? foo;
+  
+
+```
+
+```
+invalid.js:74:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    72 │ (a &= 1) ?? foo;
+    73 │ undefined ?? foo;
+  > 74 │ !bar ?? foo;
+       │ ^^^^^^^^^^^
+    75 │ void bar ?? foo;
+    76 │ typeof bar ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    72 │ (a &= 1) ?? foo;
+    73 │ undefined ?? foo;
+  > 74 │ !bar ?? foo;
+       │ ^^^^
+    75 │ void bar ?? foo;
+    76 │ typeof bar ?? foo;
+  
+
+```
+
+```
+invalid.js:75:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    73 │ undefined ?? foo;
+    74 │ !bar ?? foo;
+  > 75 │ void bar ?? foo;
+       │ ^^^^^^^^^^^^^^^
+    76 │ typeof bar ?? foo;
+    77 │ +bar ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    73 │ undefined ?? foo;
+    74 │ !bar ?? foo;
+  > 75 │ void bar ?? foo;
+       │ ^^^^^^^^
+    76 │ typeof bar ?? foo;
+    77 │ +bar ?? foo;
+  
+
+```
+
+```
+invalid.js:76:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    74 │ !bar ?? foo;
+    75 │ void bar ?? foo;
+  > 76 │ typeof bar ?? foo;
+       │ ^^^^^^^^^^^^^^^^^
+    77 │ +bar ?? foo;
+    78 │ -bar ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    74 │ !bar ?? foo;
+    75 │ void bar ?? foo;
+  > 76 │ typeof bar ?? foo;
+       │ ^^^^^^^^^^
+    77 │ +bar ?? foo;
+    78 │ -bar ?? foo;
+  
+
+```
+
+```
+invalid.js:77:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    75 │ void bar ?? foo;
+    76 │ typeof bar ?? foo;
+  > 77 │ +bar ?? foo;
+       │ ^^^^^^^^^^^
+    78 │ -bar ?? foo;
+    79 │ ~bar ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    75 │ void bar ?? foo;
+    76 │ typeof bar ?? foo;
+  > 77 │ +bar ?? foo;
+       │ ^^^^
+    78 │ -bar ?? foo;
+    79 │ ~bar ?? foo;
+  
+
+```
+
+```
+invalid.js:78:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    76 │ typeof bar ?? foo;
+    77 │ +bar ?? foo;
+  > 78 │ -bar ?? foo;
+       │ ^^^^^^^^^^^
+    79 │ ~bar ?? foo;
+    80 │ ++bar ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    76 │ typeof bar ?? foo;
+    77 │ +bar ?? foo;
+  > 78 │ -bar ?? foo;
+       │ ^^^^
+    79 │ ~bar ?? foo;
+    80 │ ++bar ?? foo;
+  
+
+```
+
+```
+invalid.js:79:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    77 │ +bar ?? foo;
+    78 │ -bar ?? foo;
+  > 79 │ ~bar ?? foo;
+       │ ^^^^^^^^^^^
+    80 │ ++bar ?? foo;
+    81 │ bar++ ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    77 │ +bar ?? foo;
+    78 │ -bar ?? foo;
+  > 79 │ ~bar ?? foo;
+       │ ^^^^
+    80 │ ++bar ?? foo;
+    81 │ bar++ ?? foo;
+  
+
+```
+
+```
+invalid.js:80:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    78 │ -bar ?? foo;
+    79 │ ~bar ?? foo;
+  > 80 │ ++bar ?? foo;
+       │ ^^^^^^^^^^^^
+    81 │ bar++ ?? foo;
+    82 │ --bar ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    78 │ -bar ?? foo;
+    79 │ ~bar ?? foo;
+  > 80 │ ++bar ?? foo;
+       │ ^^^^^
+    81 │ bar++ ?? foo;
+    82 │ --bar ?? foo;
+  
+
+```
+
+```
+invalid.js:81:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    79 │ ~bar ?? foo;
+    80 │ ++bar ?? foo;
+  > 81 │ bar++ ?? foo;
+       │ ^^^^^^^^^^^^
+    82 │ --bar ?? foo;
+    83 │ bar-- ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    79 │ ~bar ?? foo;
+    80 │ ++bar ?? foo;
+  > 81 │ bar++ ?? foo;
+       │ ^^^^^
+    82 │ --bar ?? foo;
+    83 │ bar-- ?? foo;
+  
+
+```
+
+```
+invalid.js:82:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    80 │ ++bar ?? foo;
+    81 │ bar++ ?? foo;
+  > 82 │ --bar ?? foo;
+       │ ^^^^^^^^^^^^
+    83 │ bar-- ?? foo;
+    84 │ (x == y) ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    80 │ ++bar ?? foo;
+    81 │ bar++ ?? foo;
+  > 82 │ --bar ?? foo;
+       │ ^^^^^
+    83 │ bar-- ?? foo;
+    84 │ (x == y) ?? foo;
+  
+
+```
+
+```
+invalid.js:83:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    81 │ bar++ ?? foo;
+    82 │ --bar ?? foo;
+  > 83 │ bar-- ?? foo;
+       │ ^^^^^^^^^^^^
+    84 │ (x == y) ?? foo;
+    85 │ (x + y) ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    81 │ bar++ ?? foo;
+    82 │ --bar ?? foo;
+  > 83 │ bar-- ?? foo;
+       │ ^^^^^
+    84 │ (x == y) ?? foo;
+    85 │ (x + y) ?? foo;
+  
+
+```
+
+```
+invalid.js:84:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    82 │ --bar ?? foo;
+    83 │ bar-- ?? foo;
+  > 84 │ (x == y) ?? foo;
+       │ ^^^^^^^^^^^^^^^
+    85 │ (x + y) ?? foo;
+    86 │ (x / y) ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    82 │ --bar ?? foo;
+    83 │ bar-- ?? foo;
+  > 84 │ (x == y) ?? foo;
+       │ ^^^^^^^^
+    85 │ (x + y) ?? foo;
+    86 │ (x / y) ?? foo;
+  
+
+```
+
+```
+invalid.js:85:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    83 │ bar-- ?? foo;
+    84 │ (x == y) ?? foo;
+  > 85 │ (x + y) ?? foo;
+       │ ^^^^^^^^^^^^^^
+    86 │ (x / y) ?? foo;
+    87 │ (x instanceof String) ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    83 │ bar-- ?? foo;
+    84 │ (x == y) ?? foo;
+  > 85 │ (x + y) ?? foo;
+       │ ^^^^^^^
+    86 │ (x / y) ?? foo;
+    87 │ (x instanceof String) ?? foo;
+  
+
+```
+
+```
+invalid.js:86:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    84 │ (x == y) ?? foo;
+    85 │ (x + y) ?? foo;
+  > 86 │ (x / y) ?? foo;
+       │ ^^^^^^^^^^^^^^
+    87 │ (x instanceof String) ?? foo;
+    88 │ (x in y) ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    84 │ (x == y) ?? foo;
+    85 │ (x + y) ?? foo;
+  > 86 │ (x / y) ?? foo;
+       │ ^^^^^^^
+    87 │ (x instanceof String) ?? foo;
+    88 │ (x in y) ?? foo;
+  
+
+```
+
+```
+invalid.js:87:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    85 │ (x + y) ?? foo;
+    86 │ (x / y) ?? foo;
+  > 87 │ (x instanceof String) ?? foo;
+       │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    88 │ (x in y) ?? foo;
+    89 │ Boolean(x) ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    85 │ (x + y) ?? foo;
+    86 │ (x / y) ?? foo;
+  > 87 │ (x instanceof String) ?? foo;
+       │ ^^^^^^^^^^^^^^^^^^^^^
+    88 │ (x in y) ?? foo;
+    89 │ Boolean(x) ?? foo;
+  
+
+```
+
+```
+invalid.js:88:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    86 │ (x / y) ?? foo;
+    87 │ (x instanceof String) ?? foo;
+  > 88 │ (x in y) ?? foo;
+       │ ^^^^^^^^^^^^^^^
+    89 │ Boolean(x) ?? foo;
+    90 │ String(x) ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    86 │ (x / y) ?? foo;
+    87 │ (x instanceof String) ?? foo;
+  > 88 │ (x in y) ?? foo;
+       │ ^^^^^^^^
+    89 │ Boolean(x) ?? foo;
+    90 │ String(x) ?? foo;
+  
+
+```
+
+```
+invalid.js:89:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    87 │ (x instanceof String) ?? foo;
+    88 │ (x in y) ?? foo;
+  > 89 │ Boolean(x) ?? foo;
+       │ ^^^^^^^^^^^^^^^^^
+    90 │ String(x) ?? foo;
+    91 │ Number(x) ?? foo;
+  
+  i This operand always evaluates to the same nullishness.
+  
+    87 │ (x instanceof String) ?? foo;
+    88 │ (x in y) ?? foo;
+  > 89 │ Boolean(x) ?? foo;
+       │ ^^^^^^^^^^
+    90 │ String(x) ?? foo;
+    91 │ Number(x) ?? foo;
+  
+
+```
+
+```
+invalid.js:90:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    88 │ (x in y) ?? foo;
+    89 │ Boolean(x) ?? foo;
+  > 90 │ String(x) ?? foo;
+       │ ^^^^^^^^^^^^^^^^
+    91 │ Number(x) ?? foo;
+    92 │ 
+  
+  i This operand always evaluates to the same nullishness.
+  
+    88 │ (x in y) ?? foo;
+    89 │ Boolean(x) ?? foo;
+  > 90 │ String(x) ?? foo;
+       │ ^^^^^^^^^
+    91 │ Number(x) ?? foo;
+    92 │ 
+  
+
+```
+
+```
+invalid.js:91:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    89 │ Boolean(x) ?? foo;
+    90 │ String(x) ?? foo;
+  > 91 │ Number(x) ?? foo;
+       │ ^^^^^^^^^^^^^^^^
+    92 │ 
+    93 │ // Binary expression with comparison to null
+  
+  i This operand always evaluates to the same nullishness.
+  
+    89 │ Boolean(x) ?? foo;
+    90 │ String(x) ?? foo;
+  > 91 │ Number(x) ?? foo;
+       │ ^^^^^^^^^
+    92 │ 
+    93 │ // Binary expression with comparison to null
+  
+
+```
+
+```
+invalid.js:94:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    93 │ // Binary expression with comparison to null
+  > 94 │ ({}) != null;
+       │ ^^^^^^^^^^^^
+    95 │ ({}) == null;
+    96 │ null == ({});
+  
+
+```
+
+```
+invalid.js:95:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    93 │ // Binary expression with comparison to null
+    94 │ ({}) != null;
+  > 95 │ ({}) == null;
+       │ ^^^^^^^^^^^^
+    96 │ null == ({});
+    97 │ ({}) == undefined;
+  
+
+```
+
+```
+invalid.js:96:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    94 │ ({}) != null;
+    95 │ ({}) == null;
+  > 96 │ null == ({});
+       │ ^^^^^^^^^^^^
+    97 │ ({}) == undefined;
+    98 │ undefined == ({});
+  
+
+```
+
+```
+invalid.js:97:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    95 │ ({}) == null;
+    96 │ null == ({});
+  > 97 │ ({}) == undefined;
+       │ ^^^^^^^^^^^^^^^^^
+    98 │ undefined == ({});
+    99 │ 
+  
+
+```
+
+```
+invalid.js:98:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+     96 │ null == ({});
+     97 │ ({}) == undefined;
+   > 98 │ undefined == ({});
+        │ ^^^^^^^^^^^^^^^^^
+     99 │ 
+    100 │ // Binary expression with loose comparison to boolean
+  
+
+```
+
+```
+invalid.js:101:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    100 │ // Binary expression with loose comparison to boolean
+  > 101 │ ({}) != true;
+        │ ^^^^^^^^^^^^
+    102 │ ({}) == true;
+    103 │ ([]) == true;
+  
+
+```
+
+```
+invalid.js:102:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    100 │ // Binary expression with loose comparison to boolean
+    101 │ ({}) != true;
+  > 102 │ ({}) == true;
+        │ ^^^^^^^^^^^^
+    103 │ ([]) == true;
+    104 │ ([a, b]) == true;
+  
+
+```
+
+```
+invalid.js:103:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    101 │ ({}) != true;
+    102 │ ({}) == true;
+  > 103 │ ([]) == true;
+        │ ^^^^^^^^^^^^
+    104 │ ([a, b]) == true;
+    105 │ (() => {}) == true;
+  
+
+```
+
+```
+invalid.js:104:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    102 │ ({}) == true;
+    103 │ ([]) == true;
+  > 104 │ ([a, b]) == true;
+        │ ^^^^^^^^^^^^^^^^
+    105 │ (() => {}) == true;
+    106 │ (function() {}) == true;
+  
+
+```
+
+```
+invalid.js:105:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    103 │ ([]) == true;
+    104 │ ([a, b]) == true;
+  > 105 │ (() => {}) == true;
+        │ ^^^^^^^^^^^^^^^^^^
+    106 │ (function() {}) == true;
+    107 │ void foo == true;
+  
+
+```
+
+```
+invalid.js:106:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    104 │ ([a, b]) == true;
+    105 │ (() => {}) == true;
+  > 106 │ (function() {}) == true;
+        │ ^^^^^^^^^^^^^^^^^^^^^^^
+    107 │ void foo == true;
+    108 │ typeof foo == true;
+  
+
+```
+
+```
+invalid.js:107:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    105 │ (() => {}) == true;
+    106 │ (function() {}) == true;
+  > 107 │ void foo == true;
+        │ ^^^^^^^^^^^^^^^^
+    108 │ typeof foo == true;
+    109 │ ![] == true;
+  
+
+```
+
+```
+invalid.js:108:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    106 │ (function() {}) == true;
+    107 │ void foo == true;
+  > 108 │ typeof foo == true;
+        │ ^^^^^^^^^^^^^^^^^^
+    109 │ ![] == true;
+    110 │ true == class {};
+  
+
+```
+
+```
+invalid.js:109:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    107 │ void foo == true;
+    108 │ typeof foo == true;
+  > 109 │ ![] == true;
+        │ ^^^^^^^^^^^
+    110 │ true == class {};
+    111 │ true == 1;
+  
+
+```
+
+```
+invalid.js:110:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    108 │ typeof foo == true;
+    109 │ ![] == true;
+  > 110 │ true == class {};
+        │ ^^^^^^^^^^^^^^^^
+    111 │ true == 1;
+    112 │ undefined == true;
+  
+
+```
+
+```
+invalid.js:111:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    109 │ ![] == true;
+    110 │ true == class {};
+  > 111 │ true == 1;
+        │ ^^^^^^^^^
+    112 │ undefined == true;
+    113 │ true == undefined;
+  
+
+```
+
+```
+invalid.js:112:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    110 │ true == class {};
+    111 │ true == 1;
+  > 112 │ undefined == true;
+        │ ^^^^^^^^^^^^^^^^^
+    113 │ true == undefined;
+    114 │ `hello` == true;
+  
+
+```
+
+```
+invalid.js:113:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    111 │ true == 1;
+    112 │ undefined == true;
+  > 113 │ true == undefined;
+        │ ^^^^^^^^^^^^^^^^^
+    114 │ `hello` == true;
+    115 │ /[a-z]/ == true;
+  
+
+```
+
+```
+invalid.js:114:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    112 │ undefined == true;
+    113 │ true == undefined;
+  > 114 │ `hello` == true;
+        │ ^^^^^^^^^^^^^^^
+    115 │ /[a-z]/ == true;
+    116 │ ({}) == Boolean({});
+  
+
+```
+
+```
+invalid.js:115:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    113 │ true == undefined;
+    114 │ `hello` == true;
+  > 115 │ /[a-z]/ == true;
+        │ ^^^^^^^^^^^^^^^
+    116 │ ({}) == Boolean({});
+    117 │ ({}) == Boolean();
+  
+
+```
+
+```
+invalid.js:116:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    114 │ `hello` == true;
+    115 │ /[a-z]/ == true;
+  > 116 │ ({}) == Boolean({});
+        │ ^^^^^^^^^^^^^^^^^^^
+    117 │ ({}) == Boolean();
+    118 │ ({}) == Boolean(() => {}, foo);
+  
+
+```
+
+```
+invalid.js:117:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    115 │ /[a-z]/ == true;
+    116 │ ({}) == Boolean({});
+  > 117 │ ({}) == Boolean();
+        │ ^^^^^^^^^^^^^^^^^
+    118 │ ({}) == Boolean(() => {}, foo);
+    119 │ 
+  
+
+```
+
+```
+invalid.js:118:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    116 │ ({}) == Boolean({});
+    117 │ ({}) == Boolean();
+  > 118 │ ({}) == Boolean(() => {}, foo);
+        │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    119 │ 
+    120 │ // Binary expression with strict comparison to boolean
+  
+
+```
+
+```
+invalid.js:121:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    120 │ // Binary expression with strict comparison to boolean
+  > 121 │ ({}) !== true;
+        │ ^^^^^^^^^^^^^
+    122 │ ({}) == !({});
+    123 │ ({}) === true;
+  
+
+```
+
+```
+invalid.js:122:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    120 │ // Binary expression with strict comparison to boolean
+    121 │ ({}) !== true;
+  > 122 │ ({}) == !({});
+        │ ^^^^^^^^^^^^^
+    123 │ ({}) === true;
+    124 │ ([]) === true;
+  
+
+```
+
+```
+invalid.js:123:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    121 │ ({}) !== true;
+    122 │ ({}) == !({});
+  > 123 │ ({}) === true;
+        │ ^^^^^^^^^^^^^
+    124 │ ([]) === true;
+    125 │ (function() {}) === true;
+  
+
+```
+
+```
+invalid.js:124:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    122 │ ({}) == !({});
+    123 │ ({}) === true;
+  > 124 │ ([]) === true;
+        │ ^^^^^^^^^^^^^
+    125 │ (function() {}) === true;
+    126 │ (() => {}) === true;
+  
+
+```
+
+```
+invalid.js:125:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    123 │ ({}) === true;
+    124 │ ([]) === true;
+  > 125 │ (function() {}) === true;
+        │ ^^^^^^^^^^^^^^^^^^^^^^^^
+    126 │ (() => {}) === true;
+    127 │ !{} === true;
+  
+
+```
+
+```
+invalid.js:126:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    124 │ ([]) === true;
+    125 │ (function() {}) === true;
+  > 126 │ (() => {}) === true;
+        │ ^^^^^^^^^^^^^^^^^^^
+    127 │ !{} === true;
+    128 │ typeof n === true;
+  
+
+```
+
+```
+invalid.js:127:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    125 │ (function() {}) === true;
+    126 │ (() => {}) === true;
+  > 127 │ !{} === true;
+        │ ^^^^^^^^^^^^
+    128 │ typeof n === true;
+    129 │ void n === true;
+  
+
+```
+
+```
+invalid.js:128:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    126 │ (() => {}) === true;
+    127 │ !{} === true;
+  > 128 │ typeof n === true;
+        │ ^^^^^^^^^^^^^^^^^
+    129 │ void n === true;
+    130 │ +n === true;
+  
+
+```
+
+```
+invalid.js:129:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    127 │ !{} === true;
+    128 │ typeof n === true;
+  > 129 │ void n === true;
+        │ ^^^^^^^^^^^^^^^
+    130 │ +n === true;
+    131 │ -n === true;
+  
+
+```
+
+```
+invalid.js:130:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    128 │ typeof n === true;
+    129 │ void n === true;
+  > 130 │ +n === true;
+        │ ^^^^^^^^^^^
+    131 │ -n === true;
+    132 │ ~n === true;
+  
+
+```
+
+```
+invalid.js:131:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    129 │ void n === true;
+    130 │ +n === true;
+  > 131 │ -n === true;
+        │ ^^^^^^^^^^^
+    132 │ ~n === true;
+    133 │ true === true;
+  
+
+```
+
+```
+invalid.js:132:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    130 │ +n === true;
+    131 │ -n === true;
+  > 132 │ ~n === true;
+        │ ^^^^^^^^^^^
+    133 │ true === true;
+    134 │ 1 === true;
+  
+
+```
+
+```
+invalid.js:133:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    131 │ -n === true;
+    132 │ ~n === true;
+  > 133 │ true === true;
+        │ ^^^^^^^^^^^^^
+    134 │ 1 === true;
+    135 │ 'hello' === true;
+  
+
+```
+
+```
+invalid.js:134:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    132 │ ~n === true;
+    133 │ true === true;
+  > 134 │ 1 === true;
+        │ ^^^^^^^^^^
+    135 │ 'hello' === true;
+    136 │ /[a-z]/ === true;
+  
+
+```
+
+```
+invalid.js:135:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    133 │ true === true;
+    134 │ 1 === true;
+  > 135 │ 'hello' === true;
+        │ ^^^^^^^^^^^^^^^^
+    136 │ /[a-z]/ === true;
+    137 │ undefined === true;
+  
+
+```
+
+```
+invalid.js:136:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    134 │ 1 === true;
+    135 │ 'hello' === true;
+  > 136 │ /[a-z]/ === true;
+        │ ^^^^^^^^^^^^^^^^
+    137 │ undefined === true;
+    138 │ (a = {}) === true;
+  
+
+```
+
+```
+invalid.js:137:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    135 │ 'hello' === true;
+    136 │ /[a-z]/ === true;
+  > 137 │ undefined === true;
+        │ ^^^^^^^^^^^^^^^^^^
+    138 │ (a = {}) === true;
+    139 │ (a += 1) === true;
+  
+
+```
+
+```
+invalid.js:138:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    136 │ /[a-z]/ === true;
+    137 │ undefined === true;
+  > 138 │ (a = {}) === true;
+        │ ^^^^^^^^^^^^^^^^^
+    139 │ (a += 1) === true;
+    140 │ (a -= 1) === true;
+  
+
+```
+
+```
+invalid.js:139:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    137 │ undefined === true;
+    138 │ (a = {}) === true;
+  > 139 │ (a += 1) === true;
+        │ ^^^^^^^^^^^^^^^^^
+    140 │ (a -= 1) === true;
+    141 │ (a *= 1) === true;
+  
+
+```
+
+```
+invalid.js:140:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    138 │ (a = {}) === true;
+    139 │ (a += 1) === true;
+  > 140 │ (a -= 1) === true;
+        │ ^^^^^^^^^^^^^^^^^
+    141 │ (a *= 1) === true;
+    142 │ (a %= 1) === true;
+  
+
+```
+
+```
+invalid.js:141:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    139 │ (a += 1) === true;
+    140 │ (a -= 1) === true;
+  > 141 │ (a *= 1) === true;
+        │ ^^^^^^^^^^^^^^^^^
+    142 │ (a %= 1) === true;
+    143 │ (a ** b) === true;
+  
+
+```
+
+```
+invalid.js:142:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    140 │ (a -= 1) === true;
+    141 │ (a *= 1) === true;
+  > 142 │ (a %= 1) === true;
+        │ ^^^^^^^^^^^^^^^^^
+    143 │ (a ** b) === true;
+    144 │ (a << b) === true;
+  
+
+```
+
+```
+invalid.js:143:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    141 │ (a *= 1) === true;
+    142 │ (a %= 1) === true;
+  > 143 │ (a ** b) === true;
+        │ ^^^^^^^^^^^^^^^^^
+    144 │ (a << b) === true;
+    145 │ (a >> b) === true;
+  
+
+```
+
+```
+invalid.js:144:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    142 │ (a %= 1) === true;
+    143 │ (a ** b) === true;
+  > 144 │ (a << b) === true;
+        │ ^^^^^^^^^^^^^^^^^
+    145 │ (a >> b) === true;
+    146 │ (a >>> b) === true;
+  
+
+```
+
+```
+invalid.js:145:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    143 │ (a ** b) === true;
+    144 │ (a << b) === true;
+  > 145 │ (a >> b) === true;
+        │ ^^^^^^^^^^^^^^^^^
+    146 │ (a >>> b) === true;
+    147 │ --a === true;
+  
+
+```
+
+```
+invalid.js:146:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    144 │ (a << b) === true;
+    145 │ (a >> b) === true;
+  > 146 │ (a >>> b) === true;
+        │ ^^^^^^^^^^^^^^^^^^
+    147 │ --a === true;
+    148 │ a-- === true;
+  
+
+```
+
+```
+invalid.js:147:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    145 │ (a >> b) === true;
+    146 │ (a >>> b) === true;
+  > 147 │ --a === true;
+        │ ^^^^^^^^^^^^
+    148 │ a-- === true;
+    149 │ ++a === true;
+  
+
+```
+
+```
+invalid.js:148:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    146 │ (a >>> b) === true;
+    147 │ --a === true;
+  > 148 │ a-- === true;
+        │ ^^^^^^^^^^^^
+    149 │ ++a === true;
+    150 │ a++ === true;
+  
+
+```
+
+```
+invalid.js:149:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    147 │ --a === true;
+    148 │ a-- === true;
+  > 149 │ ++a === true;
+        │ ^^^^^^^^^^^^
+    150 │ a++ === true;
+    151 │ (a + b) === true;
+  
+
+```
+
+```
+invalid.js:150:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    148 │ a-- === true;
+    149 │ ++a === true;
+  > 150 │ a++ === true;
+        │ ^^^^^^^^^^^^
+    151 │ (a + b) === true;
+    152 │ (a - b) === true;
+  
+
+```
+
+```
+invalid.js:151:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    149 │ ++a === true;
+    150 │ a++ === true;
+  > 151 │ (a + b) === true;
+        │ ^^^^^^^^^^^^^^^^
+    152 │ (a - b) === true;
+    153 │ (a * b) === true;
+  
+
+```
+
+```
+invalid.js:152:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    150 │ a++ === true;
+    151 │ (a + b) === true;
+  > 152 │ (a - b) === true;
+        │ ^^^^^^^^^^^^^^^^
+    153 │ (a * b) === true;
+    154 │ (a / b) === true;
+  
+
+```
+
+```
+invalid.js:153:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    151 │ (a + b) === true;
+    152 │ (a - b) === true;
+  > 153 │ (a * b) === true;
+        │ ^^^^^^^^^^^^^^^^
+    154 │ (a / b) === true;
+    155 │ (a % b) === true;
+  
+
+```
+
+```
+invalid.js:154:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    152 │ (a - b) === true;
+    153 │ (a * b) === true;
+  > 154 │ (a / b) === true;
+        │ ^^^^^^^^^^^^^^^^
+    155 │ (a % b) === true;
+    156 │ (a | b) === true;
+  
+
+```
+
+```
+invalid.js:155:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    153 │ (a * b) === true;
+    154 │ (a / b) === true;
+  > 155 │ (a % b) === true;
+        │ ^^^^^^^^^^^^^^^^
+    156 │ (a | b) === true;
+    157 │ (a ^ b) === true;
+  
+
+```
+
+```
+invalid.js:156:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    154 │ (a / b) === true;
+    155 │ (a % b) === true;
+  > 156 │ (a | b) === true;
+        │ ^^^^^^^^^^^^^^^^
+    157 │ (a ^ b) === true;
+    158 │ (a & b) === true;
+  
+
+```
+
+```
+invalid.js:157:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    155 │ (a % b) === true;
+    156 │ (a | b) === true;
+  > 157 │ (a ^ b) === true;
+        │ ^^^^^^^^^^^^^^^^
+    158 │ (a & b) === true;
+    159 │ Boolean(0) === Boolean(1);
+  
+
+```
+
+```
+invalid.js:158:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    156 │ (a | b) === true;
+    157 │ (a ^ b) === true;
+  > 158 │ (a & b) === true;
+        │ ^^^^^^^^^^^^^^^^
+    159 │ Boolean(0) === Boolean(1);
+    160 │ true === String(x);
+  
+
+```
+
+```
+invalid.js:159:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    157 │ (a ^ b) === true;
+    158 │ (a & b) === true;
+  > 159 │ Boolean(0) === Boolean(1);
+        │ ^^^^^^^^^^^^^^^^^^^^^^^^^
+    160 │ true === String(x);
+    161 │ true === Number(x);
+  
+
+```
+
+```
+invalid.js:160:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    158 │ (a & b) === true;
+    159 │ Boolean(0) === Boolean(1);
+  > 160 │ true === String(x);
+        │ ^^^^^^^^^^^^^^^^^^
+    161 │ true === Number(x);
+    162 │ Boolean(0) == !({});
+  
+
+```
+
+```
+invalid.js:161:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    159 │ Boolean(0) === Boolean(1);
+    160 │ true === String(x);
+  > 161 │ true === Number(x);
+        │ ^^^^^^^^^^^^^^^^^^
+    162 │ Boolean(0) == !({});
+    163 │ 
+  
+
+```
+
+```
+invalid.js:162:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    160 │ true === String(x);
+    161 │ true === Number(x);
+  > 162 │ Boolean(0) == !({});
+        │ ^^^^^^^^^^^^^^^^^^^
+    163 │ 
+    164 │ // Binary expression with strict comparison to null
+  
+
+```
+
+```
+invalid.js:165:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    164 │ // Binary expression with strict comparison to null
+  > 165 │ ({}) !== null;
+        │ ^^^^^^^^^^^^^
+    166 │ ({}) === null;
+    167 │ ([]) === null;
+  
+
+```
+
+```
+invalid.js:166:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    164 │ // Binary expression with strict comparison to null
+    165 │ ({}) !== null;
+  > 166 │ ({}) === null;
+        │ ^^^^^^^^^^^^^
+    167 │ ([]) === null;
+    168 │ (() => {}) === null;
+  
+
+```
+
+```
+invalid.js:167:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    165 │ ({}) !== null;
+    166 │ ({}) === null;
+  > 167 │ ([]) === null;
+        │ ^^^^^^^^^^^^^
+    168 │ (() => {}) === null;
+    169 │ (function() {}) === null;
+  
+
+```
+
+```
+invalid.js:168:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    166 │ ({}) === null;
+    167 │ ([]) === null;
+  > 168 │ (() => {}) === null;
+        │ ^^^^^^^^^^^^^^^^^^^
+    169 │ (function() {}) === null;
+    170 │ (class {}) === null;
+  
+
+```
+
+```
+invalid.js:169:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    167 │ ([]) === null;
+    168 │ (() => {}) === null;
+  > 169 │ (function() {}) === null;
+        │ ^^^^^^^^^^^^^^^^^^^^^^^^
+    170 │ (class {}) === null;
+    171 │ new Foo() === null;
+  
+
+```
+
+```
+invalid.js:170:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    168 │ (() => {}) === null;
+    169 │ (function() {}) === null;
+  > 170 │ (class {}) === null;
+        │ ^^^^^^^^^^^^^^^^^^^
+    171 │ new Foo() === null;
+    172 │ `` === null;
+  
+
+```
+
+```
+invalid.js:171:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    169 │ (function() {}) === null;
+    170 │ (class {}) === null;
+  > 171 │ new Foo() === null;
+        │ ^^^^^^^^^^^^^^^^^^
+    172 │ `` === null;
+    173 │ 1 === null;
+  
+
+```
+
+```
+invalid.js:172:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    170 │ (class {}) === null;
+    171 │ new Foo() === null;
+  > 172 │ `` === null;
+        │ ^^^^^^^^^^^
+    173 │ 1 === null;
+    174 │ 'hello' === null;
+  
+
+```
+
+```
+invalid.js:173:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    171 │ new Foo() === null;
+    172 │ `` === null;
+  > 173 │ 1 === null;
+        │ ^^^^^^^^^^
+    174 │ 'hello' === null;
+    175 │ /[a-z]/ === null;
+  
+
+```
+
+```
+invalid.js:174:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    172 │ `` === null;
+    173 │ 1 === null;
+  > 174 │ 'hello' === null;
+        │ ^^^^^^^^^^^^^^^^
+    175 │ /[a-z]/ === null;
+    176 │ true === null;
+  
+
+```
+
+```
+invalid.js:175:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    173 │ 1 === null;
+    174 │ 'hello' === null;
+  > 175 │ /[a-z]/ === null;
+        │ ^^^^^^^^^^^^^^^^
+    176 │ true === null;
+    177 │ null === null;
+  
+
+```
+
+```
+invalid.js:176:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    174 │ 'hello' === null;
+    175 │ /[a-z]/ === null;
+  > 176 │ true === null;
+        │ ^^^^^^^^^^^^^
+    177 │ null === null;
+    178 │ a++ === null;
+  
+
+```
+
+```
+invalid.js:177:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    175 │ /[a-z]/ === null;
+    176 │ true === null;
+  > 177 │ null === null;
+        │ ^^^^^^^^^^^^^
+    178 │ a++ === null;
+    179 │ ++a === null;
+  
+
+```
+
+```
+invalid.js:178:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    176 │ true === null;
+    177 │ null === null;
+  > 178 │ a++ === null;
+        │ ^^^^^^^^^^^^
+    179 │ ++a === null;
+    180 │ --a === null;
+  
+
+```
+
+```
+invalid.js:179:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    177 │ null === null;
+    178 │ a++ === null;
+  > 179 │ ++a === null;
+        │ ^^^^^^^^^^^^
+    180 │ --a === null;
+    181 │ a-- === null;
+  
+
+```
+
+```
+invalid.js:180:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    178 │ a++ === null;
+    179 │ ++a === null;
+  > 180 │ --a === null;
+        │ ^^^^^^^^^^^^
+    181 │ a-- === null;
+    182 │ !a === null;
+  
+
+```
+
+```
+invalid.js:181:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    179 │ ++a === null;
+    180 │ --a === null;
+  > 181 │ a-- === null;
+        │ ^^^^^^^^^^^^
+    182 │ !a === null;
+    183 │ typeof a === null;
+  
+
+```
+
+```
+invalid.js:182:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    180 │ --a === null;
+    181 │ a-- === null;
+  > 182 │ !a === null;
+        │ ^^^^^^^^^^^
+    183 │ typeof a === null;
+    184 │ delete a.b === null;
+  
+
+```
+
+```
+invalid.js:183:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    181 │ a-- === null;
+    182 │ !a === null;
+  > 183 │ typeof a === null;
+        │ ^^^^^^^^^^^^^^^^^
+    184 │ delete a.b === null;
+    185 │ void a === null;
+  
+
+```
+
+```
+invalid.js:184:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    182 │ !a === null;
+    183 │ typeof a === null;
+  > 184 │ delete a.b === null;
+        │ ^^^^^^^^^^^^^^^^^^^
+    185 │ void a === null;
+    186 │ undefined === null;
+  
+
+```
+
+```
+invalid.js:185:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    183 │ typeof a === null;
+    184 │ delete a.b === null;
+  > 185 │ void a === null;
+        │ ^^^^^^^^^^^^^^^
+    186 │ undefined === null;
+    187 │ (x = {}) === null;
+  
+
+```
+
+```
+invalid.js:186:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    184 │ delete a.b === null;
+    185 │ void a === null;
+  > 186 │ undefined === null;
+        │ ^^^^^^^^^^^^^^^^^^
+    187 │ (x = {}) === null;
+    188 │ (x += y) === null;
+  
+
+```
+
+```
+invalid.js:187:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    185 │ void a === null;
+    186 │ undefined === null;
+  > 187 │ (x = {}) === null;
+        │ ^^^^^^^^^^^^^^^^^
+    188 │ (x += y) === null;
+    189 │ (x -= y) === null;
+  
+
+```
+
+```
+invalid.js:188:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    186 │ undefined === null;
+    187 │ (x = {}) === null;
+  > 188 │ (x += y) === null;
+        │ ^^^^^^^^^^^^^^^^^
+    189 │ (x -= y) === null;
+    190 │ (a, b, {}) === null;
+  
+
+```
+
+```
+invalid.js:189:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    187 │ (x = {}) === null;
+    188 │ (x += y) === null;
+  > 189 │ (x -= y) === null;
+        │ ^^^^^^^^^^^^^^^^^
+    190 │ (a, b, {}) === null;
+    191 │ 
+  
+
+```
+
+```
+invalid.js:190:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    188 │ (x += y) === null;
+    189 │ (x -= y) === null;
+  > 190 │ (a, b, {}) === null;
+        │ ^^^^^^^^^^^^^^^^^^^
+    191 │ 
+    192 │ // Binary expression with strict comparison to undefined
+  
+
+```
+
+```
+invalid.js:193:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    192 │ // Binary expression with strict comparison to undefined
+  > 193 │ ({}) !== undefined;
+        │ ^^^^^^^^^^^^^^^^^^
+    194 │ ({}) === undefined;
+    195 │ ([]) === undefined;
+  
+
+```
+
+```
+invalid.js:194:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    192 │ // Binary expression with strict comparison to undefined
+    193 │ ({}) !== undefined;
+  > 194 │ ({}) === undefined;
+        │ ^^^^^^^^^^^^^^^^^^
+    195 │ ([]) === undefined;
+    196 │ (() => {}) === undefined;
+  
+
+```
+
+```
+invalid.js:195:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    193 │ ({}) !== undefined;
+    194 │ ({}) === undefined;
+  > 195 │ ([]) === undefined;
+        │ ^^^^^^^^^^^^^^^^^^
+    196 │ (() => {}) === undefined;
+    197 │ (function() {}) === undefined;
+  
+
+```
+
+```
+invalid.js:196:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    194 │ ({}) === undefined;
+    195 │ ([]) === undefined;
+  > 196 │ (() => {}) === undefined;
+        │ ^^^^^^^^^^^^^^^^^^^^^^^^
+    197 │ (function() {}) === undefined;
+    198 │ (class {}) === undefined;
+  
+
+```
+
+```
+invalid.js:197:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    195 │ ([]) === undefined;
+    196 │ (() => {}) === undefined;
+  > 197 │ (function() {}) === undefined;
+        │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    198 │ (class {}) === undefined;
+    199 │ new Foo() === undefined;
+  
+
+```
+
+```
+invalid.js:198:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    196 │ (() => {}) === undefined;
+    197 │ (function() {}) === undefined;
+  > 198 │ (class {}) === undefined;
+        │ ^^^^^^^^^^^^^^^^^^^^^^^^
+    199 │ new Foo() === undefined;
+    200 │ `` === undefined;
+  
+
+```
+
+```
+invalid.js:199:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    197 │ (function() {}) === undefined;
+    198 │ (class {}) === undefined;
+  > 199 │ new Foo() === undefined;
+        │ ^^^^^^^^^^^^^^^^^^^^^^^
+    200 │ `` === undefined;
+    201 │ 1 === undefined;
+  
+
+```
+
+```
+invalid.js:200:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    198 │ (class {}) === undefined;
+    199 │ new Foo() === undefined;
+  > 200 │ `` === undefined;
+        │ ^^^^^^^^^^^^^^^^
+    201 │ 1 === undefined;
+    202 │ 'hello' === undefined;
+  
+
+```
+
+```
+invalid.js:201:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    199 │ new Foo() === undefined;
+    200 │ `` === undefined;
+  > 201 │ 1 === undefined;
+        │ ^^^^^^^^^^^^^^^
+    202 │ 'hello' === undefined;
+    203 │ /[a-z]/ === undefined;
+  
+
+```
+
+```
+invalid.js:202:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    200 │ `` === undefined;
+    201 │ 1 === undefined;
+  > 202 │ 'hello' === undefined;
+        │ ^^^^^^^^^^^^^^^^^^^^^
+    203 │ /[a-z]/ === undefined;
+    204 │ true === undefined;
+  
+
+```
+
+```
+invalid.js:203:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    201 │ 1 === undefined;
+    202 │ 'hello' === undefined;
+  > 203 │ /[a-z]/ === undefined;
+        │ ^^^^^^^^^^^^^^^^^^^^^
+    204 │ true === undefined;
+    205 │ null === undefined;
+  
+
+```
+
+```
+invalid.js:204:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    202 │ 'hello' === undefined;
+    203 │ /[a-z]/ === undefined;
+  > 204 │ true === undefined;
+        │ ^^^^^^^^^^^^^^^^^^
+    205 │ null === undefined;
+    206 │ a++ === undefined;
+  
+
+```
+
+```
+invalid.js:205:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    203 │ /[a-z]/ === undefined;
+    204 │ true === undefined;
+  > 205 │ null === undefined;
+        │ ^^^^^^^^^^^^^^^^^^
+    206 │ a++ === undefined;
+    207 │ ++a === undefined;
+  
+
+```
+
+```
+invalid.js:206:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    204 │ true === undefined;
+    205 │ null === undefined;
+  > 206 │ a++ === undefined;
+        │ ^^^^^^^^^^^^^^^^^
+    207 │ ++a === undefined;
+    208 │ --a === undefined;
+  
+
+```
+
+```
+invalid.js:207:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    205 │ null === undefined;
+    206 │ a++ === undefined;
+  > 207 │ ++a === undefined;
+        │ ^^^^^^^^^^^^^^^^^
+    208 │ --a === undefined;
+    209 │ a-- === undefined;
+  
+
+```
+
+```
+invalid.js:208:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    206 │ a++ === undefined;
+    207 │ ++a === undefined;
+  > 208 │ --a === undefined;
+        │ ^^^^^^^^^^^^^^^^^
+    209 │ a-- === undefined;
+    210 │ !a === undefined;
+  
+
+```
+
+```
+invalid.js:209:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    207 │ ++a === undefined;
+    208 │ --a === undefined;
+  > 209 │ a-- === undefined;
+        │ ^^^^^^^^^^^^^^^^^
+    210 │ !a === undefined;
+    211 │ typeof a === undefined;
+  
+
+```
+
+```
+invalid.js:210:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    208 │ --a === undefined;
+    209 │ a-- === undefined;
+  > 210 │ !a === undefined;
+        │ ^^^^^^^^^^^^^^^^
+    211 │ typeof a === undefined;
+    212 │ delete a.b === undefined;
+  
+
+```
+
+```
+invalid.js:211:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    209 │ a-- === undefined;
+    210 │ !a === undefined;
+  > 211 │ typeof a === undefined;
+        │ ^^^^^^^^^^^^^^^^^^^^^^
+    212 │ delete a.b === undefined;
+    213 │ void a === undefined;
+  
+
+```
+
+```
+invalid.js:212:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    210 │ !a === undefined;
+    211 │ typeof a === undefined;
+  > 212 │ delete a.b === undefined;
+        │ ^^^^^^^^^^^^^^^^^^^^^^^^
+    213 │ void a === undefined;
+    214 │ undefined === undefined;
+  
+
+```
+
+```
+invalid.js:213:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    211 │ typeof a === undefined;
+    212 │ delete a.b === undefined;
+  > 213 │ void a === undefined;
+        │ ^^^^^^^^^^^^^^^^^^^^
+    214 │ undefined === undefined;
+    215 │ (x = {}) === undefined;
+  
+
+```
+
+```
+invalid.js:214:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    212 │ delete a.b === undefined;
+    213 │ void a === undefined;
+  > 214 │ undefined === undefined;
+        │ ^^^^^^^^^^^^^^^^^^^^^^^
+    215 │ (x = {}) === undefined;
+    216 │ (x += y) === undefined;
+  
+
+```
+
+```
+invalid.js:215:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    213 │ void a === undefined;
+    214 │ undefined === undefined;
+  > 215 │ (x = {}) === undefined;
+        │ ^^^^^^^^^^^^^^^^^^^^^^
+    216 │ (x += y) === undefined;
+    217 │ (x -= y) === undefined;
+  
+
+```
+
+```
+invalid.js:216:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    214 │ undefined === undefined;
+    215 │ (x = {}) === undefined;
+  > 216 │ (x += y) === undefined;
+        │ ^^^^^^^^^^^^^^^^^^^^^^
+    217 │ (x -= y) === undefined;
+    218 │ (a, b, {}) === undefined;
+  
+
+```
+
+```
+invalid.js:217:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    215 │ (x = {}) === undefined;
+    216 │ (x += y) === undefined;
+  > 217 │ (x -= y) === undefined;
+        │ ^^^^^^^^^^^^^^^^^^^^^^
+    218 │ (a, b, {}) === undefined;
+    219 │ 
+  
+
+```
+
+```
+invalid.js:218:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This binary expression leads to a constant result.
+  
+    216 │ (x += y) === undefined;
+    217 │ (x -= y) === undefined;
+  > 218 │ (a, b, {}) === undefined;
+        │ ^^^^^^^^^^^^^^^^^^^^^^^^
+    219 │ 
+    220 │ /*
+  
+
+```
+
+```
+invalid.js:224:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! Unexpected comparison of two newly constructed objects.
+  
+    222 │  * never be equal, even with == equality.
+    223 │  */
+  > 224 │ [a] == [a];
+        │ ^^^^^^^^^^
+    225 │ [a] != [a];
+    226 │ ({}) == [];
+  
+
+```
+
+```
+invalid.js:225:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! Unexpected comparison of two newly constructed objects.
+  
+    223 │  */
+    224 │ [a] == [a];
+  > 225 │ [a] != [a];
+        │ ^^^^^^^^^^
+    226 │ ({}) == [];
+    227 │ 
+  
+
+```
+
+```
+invalid.js:226:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! Unexpected comparison of two newly constructed objects.
+  
+    224 │ [a] == [a];
+    225 │ [a] != [a];
+  > 226 │ ({}) == [];
+        │ ^^^^^^^^^^
+    227 │ 
+    228 │ // Comparing to always new objects
+  
+
+```
+
+```
+invalid.js:229:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! Unexpected comparison to newly constructed object.
+  
+    228 │ // Comparing to always new objects
+  > 229 │ x === {};
+        │ ^^^^^^^^
+    230 │ x !== {};
+    231 │ x === [];
+  
+  i This expression always constructs a new object.
+  
+    228 │ // Comparing to always new objects
+  > 229 │ x === {};
+        │       ^^
+    230 │ x !== {};
+    231 │ x === [];
+  
+
+```
+
+```
+invalid.js:230:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! Unexpected comparison to newly constructed object.
+  
+    228 │ // Comparing to always new objects
+    229 │ x === {};
+  > 230 │ x !== {};
+        │ ^^^^^^^^
+    231 │ x === [];
+    232 │ x === (() => {});
+  
+  i This expression always constructs a new object.
+  
+    228 │ // Comparing to always new objects
+    229 │ x === {};
+  > 230 │ x !== {};
+        │       ^^
+    231 │ x === [];
+    232 │ x === (() => {});
+  
+
+```
+
+```
+invalid.js:231:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! Unexpected comparison to newly constructed object.
+  
+    229 │ x === {};
+    230 │ x !== {};
+  > 231 │ x === [];
+        │ ^^^^^^^^
+    232 │ x === (() => {});
+    233 │ x === (function() {});
+  
+  i This expression always constructs a new object.
+  
+    229 │ x === {};
+    230 │ x !== {};
+  > 231 │ x === [];
+        │       ^^
+    232 │ x === (() => {});
+    233 │ x === (function() {});
+  
+
+```
+
+```
+invalid.js:232:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! Unexpected comparison to newly constructed object.
+  
+    230 │ x !== {};
+    231 │ x === [];
+  > 232 │ x === (() => {});
+        │ ^^^^^^^^^^^^^^^^
+    233 │ x === (function() {});
+    234 │ x === (class {});
+  
+  i This expression always constructs a new object.
+  
+    230 │ x !== {};
+    231 │ x === [];
+  > 232 │ x === (() => {});
+        │       ^^^^^^^^^^
+    233 │ x === (function() {});
+    234 │ x === (class {});
+  
+
+```
+
+```
+invalid.js:233:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! Unexpected comparison to newly constructed object.
+  
+    231 │ x === [];
+    232 │ x === (() => {});
+  > 233 │ x === (function() {});
+        │ ^^^^^^^^^^^^^^^^^^^^^
+    234 │ x === (class {});
+    235 │ x === new Boolean();
+  
+  i This expression always constructs a new object.
+  
+    231 │ x === [];
+    232 │ x === (() => {});
+  > 233 │ x === (function() {});
+        │       ^^^^^^^^^^^^^^^
+    234 │ x === (class {});
+    235 │ x === new Boolean();
+  
+
+```
+
+```
+invalid.js:234:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! Unexpected comparison to newly constructed object.
+  
+    232 │ x === (() => {});
+    233 │ x === (function() {});
+  > 234 │ x === (class {});
+        │ ^^^^^^^^^^^^^^^^
+    235 │ x === new Boolean();
+    236 │ x === new Promise();
+  
+  i This expression always constructs a new object.
+  
+    232 │ x === (() => {});
+    233 │ x === (function() {});
+  > 234 │ x === (class {});
+        │       ^^^^^^^^^^
+    235 │ x === new Boolean();
+    236 │ x === new Promise();
+  
+
+```
+
+```
+invalid.js:235:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! Unexpected comparison to newly constructed object.
+  
+    233 │ x === (function() {});
+    234 │ x === (class {});
+  > 235 │ x === new Boolean();
+        │ ^^^^^^^^^^^^^^^^^^^
+    236 │ x === new Promise();
+    237 │ x === new WeakSet();
+  
+  i This expression always constructs a new object.
+  
+    233 │ x === (function() {});
+    234 │ x === (class {});
+  > 235 │ x === new Boolean();
+        │       ^^^^^^^^^^^^^
+    236 │ x === new Promise();
+    237 │ x === new WeakSet();
+  
+
+```
+
+```
+invalid.js:236:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! Unexpected comparison to newly constructed object.
+  
+    234 │ x === (class {});
+    235 │ x === new Boolean();
+  > 236 │ x === new Promise();
+        │ ^^^^^^^^^^^^^^^^^^^
+    237 │ x === new WeakSet();
+    238 │ x === (foo, {});
+  
+  i This expression always constructs a new object.
+  
+    234 │ x === (class {});
+    235 │ x === new Boolean();
+  > 236 │ x === new Promise();
+        │       ^^^^^^^^^^^^^
+    237 │ x === new WeakSet();
+    238 │ x === (foo, {});
+  
+
+```
+
+```
+invalid.js:237:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! Unexpected comparison to newly constructed object.
+  
+    235 │ x === new Boolean();
+    236 │ x === new Promise();
+  > 237 │ x === new WeakSet();
+        │ ^^^^^^^^^^^^^^^^^^^
+    238 │ x === (foo, {});
+    239 │ x === (y = {});
+  
+  i This expression always constructs a new object.
+  
+    235 │ x === new Boolean();
+    236 │ x === new Promise();
+  > 237 │ x === new WeakSet();
+        │       ^^^^^^^^^^^^^
+    238 │ x === (foo, {});
+    239 │ x === (y = {});
+  
+
+```
+
+```
+invalid.js:240:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! Unexpected comparison to newly constructed object.
+  
+    238 │ x === (foo, {});
+    239 │ x === (y = {});
+  > 240 │ x === (y ? {} : []);
+        │ ^^^^^^^^^^^^^^^^^^^
+    241 │ x === /[a-z]/;
+    242 │ 
+  
+  i This expression always constructs a new object.
+  
+    238 │ x === (foo, {});
+    239 │ x === (y = {});
+  > 240 │ x === (y ? {} : []);
+        │       ^^^^^^^^^^^^^
+    241 │ x === /[a-z]/;
+    242 │ 
+  
+
+```
+
+```
+invalid.js:241:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! Unexpected comparison to newly constructed object.
+  
+    239 │ x === (y = {});
+    240 │ x === (y ? {} : []);
+  > 241 │ x === /[a-z]/;
+        │ ^^^^^^^^^^^^^
+    242 │ 
+    243 │ // It's not obvious what this does, but it compares the old value of `x` to the new object.
+  
+  i This expression always constructs a new object.
+  
+    239 │ x === (y = {});
+    240 │ x === (y ? {} : []);
+  > 241 │ x === /[a-z]/;
+        │       ^^^^^^^
+    242 │ 
+    243 │ // It's not obvious what this does, but it compares the old value of `x` to the new object.
+  
+
+```
+
+```
+invalid.js:246:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    244 │ x === (x = {});
+    245 │ 
+  > 246 │ window.abc && false && anything;
+        │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    247 │ window.abc || true || anything;
+    248 │ window.abc ?? 'non-nullish' ?? anything;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    244 │ x === (x = {});
+    245 │ 
+  > 246 │ window.abc && false && anything;
+        │ ^^^^^^^^^^^^^^^^^^^
+    247 │ window.abc || true || anything;
+    248 │ window.abc ?? 'non-nullish' ?? anything;
+  
+
+```
+
+```
+invalid.js:247:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    246 │ window.abc && false && anything;
+  > 247 │ window.abc || true || anything;
+        │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    248 │ window.abc ?? 'non-nullish' ?? anything;
+    249 │ 
+  
+  i This operand always evaluates to the same truthiness.
+  
+    246 │ window.abc && false && anything;
+  > 247 │ window.abc || true || anything;
+        │ ^^^^^^^^^^^^^^^^^^
+    248 │ window.abc ?? 'non-nullish' ?? anything;
+    249 │ 
+  
+
+```
+
+```
+invalid.js:248:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    246 │ window.abc && false && anything;
+    247 │ window.abc || true || anything;
+  > 248 │ window.abc ?? 'non-nullish' ?? anything;
+        │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    249 │ 
+  
+  i This operand always evaluates to the same nullishness.
+  
+    246 │ window.abc && false && anything;
+    247 │ window.abc || true || anything;
+  > 248 │ window.abc ?? 'non-nullish' ?? anything;
+        │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    249 │ 
+  
+
+```
diff --git a/crates/biome_js_analyze/tests/specs/nursery/noConstantBinaryExpression/invalid.jsx b/crates/biome_js_analyze/tests/specs/nursery/noConstantBinaryExpression/invalid.jsx
new file mode 100644
index 000000000000..13cc28e95a79
--- /dev/null
+++ b/crates/biome_js_analyze/tests/specs/nursery/noConstantBinaryExpression/invalid.jsx
@@ -0,0 +1,6 @@
+true && <p />;
+true && <></>;
+true || <p />;
+true || <></>;
+true ?? <></>;
+true ?? <></>;
diff --git a/crates/biome_js_analyze/tests/specs/nursery/noConstantBinaryExpression/invalid.jsx.snap b/crates/biome_js_analyze/tests/specs/nursery/noConstantBinaryExpression/invalid.jsx.snap
new file mode 100644
index 000000000000..fb45ea00a464
--- /dev/null
+++ b/crates/biome_js_analyze/tests/specs/nursery/noConstantBinaryExpression/invalid.jsx.snap
@@ -0,0 +1,151 @@
+---
+source: crates/biome_js_analyze/tests/spec_tests.rs
+expression: invalid.jsx
+---
+# Input
+```jsx
+true && <p />;
+true && <></>;
+true || <p />;
+true || <></>;
+true ?? <></>;
+true ?? <></>;
+
+```
+
+# Diagnostics
+```
+invalid.jsx:1:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+  > 1 │ true && <p />;
+      │ ^^^^^^^^^^^^^
+    2 │ true && <></>;
+    3 │ true || <p />;
+  
+  i This operand always evaluates to the same truthiness.
+  
+  > 1 │ true && <p />;
+      │ ^^^^
+    2 │ true && <></>;
+    3 │ true || <p />;
+  
+
+```
+
+```
+invalid.jsx:2:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    1 │ true && <p />;
+  > 2 │ true && <></>;
+      │ ^^^^^^^^^^^^^
+    3 │ true || <p />;
+    4 │ true || <></>;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    1 │ true && <p />;
+  > 2 │ true && <></>;
+      │ ^^^^
+    3 │ true || <p />;
+    4 │ true || <></>;
+  
+
+```
+
+```
+invalid.jsx:3:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    1 │ true && <p />;
+    2 │ true && <></>;
+  > 3 │ true || <p />;
+      │ ^^^^^^^^^^^^^
+    4 │ true || <></>;
+    5 │ true ?? <></>;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    1 │ true && <p />;
+    2 │ true && <></>;
+  > 3 │ true || <p />;
+      │ ^^^^
+    4 │ true || <></>;
+    5 │ true ?? <></>;
+  
+
+```
+
+```
+invalid.jsx:4:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    2 │ true && <></>;
+    3 │ true || <p />;
+  > 4 │ true || <></>;
+      │ ^^^^^^^^^^^^^
+    5 │ true ?? <></>;
+    6 │ true ?? <></>;
+  
+  i This operand always evaluates to the same truthiness.
+  
+    2 │ true && <></>;
+    3 │ true || <p />;
+  > 4 │ true || <></>;
+      │ ^^^^
+    5 │ true ?? <></>;
+    6 │ true ?? <></>;
+  
+
+```
+
+```
+invalid.jsx:5:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    3 │ true || <p />;
+    4 │ true || <></>;
+  > 5 │ true ?? <></>;
+      │ ^^^^^^^^^^^^^
+    6 │ true ?? <></>;
+    7 │ 
+  
+  i This operand always evaluates to the same nullishness.
+  
+    3 │ true || <p />;
+    4 │ true || <></>;
+  > 5 │ true ?? <></>;
+      │ ^^^^
+    6 │ true ?? <></>;
+    7 │ 
+  
+
+```
+
+```
+invalid.jsx:6:1 lint/nursery/noConstantBinaryExpression ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+  ! This logical expression can be simplified.
+  
+    4 │ true || <></>;
+    5 │ true ?? <></>;
+  > 6 │ true ?? <></>;
+      │ ^^^^^^^^^^^^^
+    7 │ 
+  
+  i This operand always evaluates to the same nullishness.
+  
+    4 │ true || <></>;
+    5 │ true ?? <></>;
+  > 6 │ true ?? <></>;
+      │ ^^^^
+    7 │ 
+  
+
+```
diff --git a/crates/biome_js_analyze/tests/specs/nursery/noConstantBinaryExpression/valid.js b/crates/biome_js_analyze/tests/specs/nursery/noConstantBinaryExpression/valid.js
new file mode 100644
index 000000000000..42d9e2fe8668
--- /dev/null
+++ b/crates/biome_js_analyze/tests/specs/nursery/noConstantBinaryExpression/valid.js
@@ -0,0 +1,38 @@
+arbitraryFunctΩion(n) ?? foo;
+foo.Boolean(n) ?? foo;
+(x += 1) && foo;
+`${bar}` && foo;
+bar && foo;
+delete bar.baz && foo;
+true ? foo : bar; // We leave ConditionalExpression for `noConstantCondition`.
+new Foo() == true;
+foo == true;
+`${foo}` == true;
+`${foo}${bar}` == true;
+`0${foo}` == true;
+`00000000${foo}` == true;
+`0${foo}.000` == true;
+[n] == true;
+
+delete bar.baz === true;
+
+foo.Boolean(true) && foo;
+(() => { function Boolean(n) { return n; }; Boolean(x) ?? foo; })();
+(() => { function String(n) { return n; }; String(x) ?? foo; })();
+(() => { function Number(n) { return n; }; Number(x) ?? foo; })();
+(() => { function Boolean(n) { return Math.random(); }; Boolean(x) === 1; })();
+(() => { function Boolean(n) { return Math.random(); }; Boolean(1) == true; })();
+
+new Foo() === x;
+x === new someObj.Promise();
+Boolean(foo) === true;
+function foo(undefined) { undefined ?? bar; };
+function foo(undefined) { undefined == true; };
+function foo(undefined) { undefined === true; };
+[...arr, 1] == true;
+[,,,] == true;
+new Foo() === bar;
+(foo && true) ?? bar;
+foo ?? null ?? bar;
+a ?? (doSomething(), undefined) ?? b;
+a ?? (something = null) ?? ;
diff --git a/crates/biome_js_analyze/tests/specs/nursery/noConstantBinaryExpression/valid.js.snap b/crates/biome_js_analyze/tests/specs/nursery/noConstantBinaryExpression/valid.js.snap
new file mode 100644
index 000000000000..f29ddc78127b
--- /dev/null
+++ b/crates/biome_js_analyze/tests/specs/nursery/noConstantBinaryExpression/valid.js.snap
@@ -0,0 +1,46 @@
+---
+source: crates/biome_js_analyze/tests/spec_tests.rs
+expression: valid.js
+---
+# Input
+```js
+arbitraryFunctΩion(n) ?? foo;
+foo.Boolean(n) ?? foo;
+(x += 1) && foo;
+`${bar}` && foo;
+bar && foo;
+delete bar.baz && foo;
+true ? foo : bar; // We leave ConditionalExpression for `noConstantCondition`.
+new Foo() == true;
+foo == true;
+`${foo}` == true;
+`${foo}${bar}` == true;
+`0${foo}` == true;
+`00000000${foo}` == true;
+`0${foo}.000` == true;
+[n] == true;
+
+delete bar.baz === true;
+
+foo.Boolean(true) && foo;
+(() => { function Boolean(n) { return n; }; Boolean(x) ?? foo; })();
+(() => { function String(n) { return n; }; String(x) ?? foo; })();
+(() => { function Number(n) { return n; }; Number(x) ?? foo; })();
+(() => { function Boolean(n) { return Math.random(); }; Boolean(x) === 1; })();
+(() => { function Boolean(n) { return Math.random(); }; Boolean(1) == true; })();
+
+new Foo() === x;
+x === new someObj.Promise();
+Boolean(foo) === true;
+function foo(undefined) { undefined ?? bar; };
+function foo(undefined) { undefined == true; };
+function foo(undefined) { undefined === true; };
+[...arr, 1] == true;
+[,,,] == true;
+new Foo() === bar;
+(foo && true) ?? bar;
+foo ?? null ?? bar;
+a ?? (doSomething(), undefined) ?? b;
+a ?? (something = null) ?? ;
+
+```
diff --git a/crates/biome_js_analyze/tests/specs/nursery/noConstantBinaryExpression/valid.jsx b/crates/biome_js_analyze/tests/specs/nursery/noConstantBinaryExpression/valid.jsx
new file mode 100644
index 000000000000..2ad4b772735d
--- /dev/null
+++ b/crates/biome_js_analyze/tests/specs/nursery/noConstantBinaryExpression/valid.jsx
@@ -0,0 +1,4 @@
+<p /> && foo;
+<></> && foo;
+<p /> ?? foo;
+<></> ?? foo;
diff --git a/crates/biome_js_analyze/tests/specs/nursery/noConstantBinaryExpression/valid.jsx.snap b/crates/biome_js_analyze/tests/specs/nursery/noConstantBinaryExpression/valid.jsx.snap
new file mode 100644
index 000000000000..1e00877cd2a3
--- /dev/null
+++ b/crates/biome_js_analyze/tests/specs/nursery/noConstantBinaryExpression/valid.jsx.snap
@@ -0,0 +1,12 @@
+---
+source: crates/biome_js_analyze/tests/spec_tests.rs
+expression: valid.jsx
+---
+# Input
+```jsx
+<p /> && foo;
+<></> && foo;
+<p /> ?? foo;
+<></> ?? foo;
+
+```