We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f64bfa2 commit 4af7f8dCopy full SHA for 4af7f8d
crates/biome_js_analyze/src/lint/nursery/no_parameters_only_used_in_recursion.rs
@@ -317,12 +317,7 @@ fn get_arrow_function_name(
317
let arrow_syntax = arrow_fn.syntax();
318
319
// Walk up the syntax tree to find a variable declarator or assignment
320
- for ancestor in arrow_syntax.ancestors() {
321
- // Skip the arrow function node itself
322
- if ancestor == *arrow_syntax {
323
- continue;
324
- }
325
-
+ for ancestor in arrow_syntax.ancestors().skip(1) {
326
// Check for variable declarator: const foo = () => ...
327
if let Some(declarator) = JsVariableDeclarator::cast_ref(&ancestor) {
328
return declarator
0 commit comments