Skip to content

Commit

Permalink
span() -> span
Browse files Browse the repository at this point in the history
  • Loading branch information
baseballyama committed Dec 27, 2024
1 parent 1450146 commit 155d9ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/oxc_linter/src/rules/eslint/no_negated_condition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use oxc_ast::ast::{ConditionalExpression, Expression, IfStatement, Statement};
use oxc_ast::AstKind;
use oxc_diagnostics::OxcDiagnostic;
use oxc_macros::declare_oxc_lint;
use oxc_span::{GetSpan, Span};
use oxc_span::Span;
use oxc_syntax::operator::{BinaryOperator, UnaryOperator};

fn no_negated_condition_diagnostic(span: Span) -> OxcDiagnostic {
Expand Down Expand Up @@ -56,12 +56,12 @@ impl Rule for NoNegatedCondition {
}

if is_negated_if(if_stmt) {
ctx.diagnostic(no_negated_condition_diagnostic(if_stmt.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(conditional_expr.span()));
ctx.diagnostic(no_negated_condition_diagnostic(conditional_expr.span));
}
}
_ => {}
Expand Down

0 comments on commit 155d9ea

Please sign in to comment.