Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/oxc_linter/src/rules/eslint/no_constant_condition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use crate::{AstNode, ast_util::IsConstant, context::LintContext, rule::Rule};

fn no_constant_condition_diagnostic(span: Span) -> OxcDiagnostic {
OxcDiagnostic::warn("Unexpected constant condition")
.with_help("Constant expression as a test condition is not allowed")
.with_label(span)
.with_help("Update the condition to not be constant, or remove the condition entirely")
.with_label(span.label("this expression will always evaluate to the same value"))
}

#[derive(Debug, Default, Clone, PartialEq, JsonSchema, Deserialize, Serialize)]
Expand Down
Loading
Loading