Skip to content

Commit

Permalink
fix: use new methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Oct 23, 2024
1 parent acd2b3b commit ad0ccef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ impl Rule for NoUselessUndefined {
"Don't use unnecessary "<Emphasis>"undefined"</Emphasis>"."
},
)
.note(markup! {
.note(markup! {
""<Emphasis>"undefined"</Emphasis>" is the default value for new variables, parameters, return statements, etc… so specifying it doesn't make any difference."
}),
)
Expand All @@ -258,7 +258,8 @@ impl Rule for NoUselessUndefined {
.filter_map(Result::ok)
.find(|decl| {
decl.id().is_ok_and(|id| {
id.text() == state.binding_text.as_deref().unwrap_or("")
id.syntax().text_trimmed()
== state.binding_text.as_deref().unwrap_or("")
})
})?;

Expand Down
5 changes: 1 addition & 4 deletions crates/biome_js_analyze/src/lint/nursery/use_collapsed_if.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use biome_analyze::{
context::RuleContext, declare_lint_rule, ActionCategory, Ast, FixKind, Rule, RuleDiagnostic,
RuleSource,
};
use biome_analyze::{context::RuleContext, declare_lint_rule, ActionCategory, Ast, FixKind, QueryMatch, Rule, RuleDiagnostic, RuleSource};
use biome_console::markup;
use biome_js_factory::make;
use biome_js_syntax::parentheses::NeedsParentheses;
Expand Down

0 comments on commit ad0ccef

Please sign in to comment.