From 145014607b69f6e49c7c40a7526595d545683276 Mon Sep 17 00:00:00 2001 From: baseballyama Date: Sat, 28 Dec 2024 02:00:49 +0900 Subject: [PATCH] update according to comment --- crates/oxc_linter/src/rules/eslint/no_negated_condition.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/oxc_linter/src/rules/eslint/no_negated_condition.rs b/crates/oxc_linter/src/rules/eslint/no_negated_condition.rs index d6d8edd7e01cb..bc3938834427a 100644 --- a/crates/oxc_linter/src/rules/eslint/no_negated_condition.rs +++ b/crates/oxc_linter/src/rules/eslint/no_negated_condition.rs @@ -44,6 +44,7 @@ declare_oxc_lint!( /// ``` NoNegatedCondition, style, + pending, ); impl Rule for NoNegatedCondition { @@ -55,12 +56,12 @@ impl Rule for NoNegatedCondition { } if is_negated_if(if_stmt) { - ctx.diagnostic(no_negated_condition_diagnostic(node.span())); + ctx.diagnostic(no_negated_condition_diagnostic(if_stmt.span())); } } AstKind::ConditionalExpression(conditional_expr) => { if is_negated_if_conditional(conditional_expr) { - ctx.diagnostic(no_negated_condition_diagnostic(node.span())); + ctx.diagnostic(no_negated_condition_diagnostic(conditional_expr.span())); } } _ => {}