Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
chore: 🤖 merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
IWANABETHATGUY committed Jul 6, 2022
1 parent d303628 commit f96fd77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/rome_js_analyze/src/analyzers/no_comment_text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl Rule for NoCommentText {
type Signals = Option<Self::State>;

fn run(ctx: &RuleContext<Self>) -> Option<Self::State> {
let Ast(n) = ctx.query();
let n = ctx.query();
let jsx_value = n.text();
let is_single_line_comment = jsx_value.starts_with("//");
let is_multi_line_comment = jsx_value.starts_with("/*") && jsx_value.ends_with("*/");
Expand All @@ -57,7 +57,7 @@ impl Rule for NoCommentText {
}

fn diagnostic(ctx: &RuleContext<Self>, _: &Self::State) -> Option<RuleDiagnostic> {
let Ast(node) = ctx.query();
let node = ctx.query();

Some(RuleDiagnostic::warning(
node.range(),
Expand All @@ -68,7 +68,7 @@ impl Rule for NoCommentText {
}

fn action(ctx: &RuleContext<Self>, _: &Self::State) -> Option<JsRuleAction> {
let Ast(node) = ctx.query();
let node = ctx.query();

let normalized_comment = format!(
"/*{}*/",
Expand Down

0 comments on commit f96fd77

Please sign in to comment.