From 14aa74c998ff193fccfde5f110d07b09a0e5b49f Mon Sep 17 00:00:00 2001 From: no-yan <63000297+no-yan@users.noreply.github.com> Date: Tue, 5 Nov 2024 09:26:19 +0900 Subject: [PATCH] fixup! feat(linter): add jsx support for only-used-in-recursion --- crates/oxc_linter/src/rules/oxc/only_used_in_recursion.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/oxc_linter/src/rules/oxc/only_used_in_recursion.rs b/crates/oxc_linter/src/rules/oxc/only_used_in_recursion.rs index c4a2dd558fa1a3..dd525d9867495c 100644 --- a/crates/oxc_linter/src/rules/oxc/only_used_in_recursion.rs +++ b/crates/oxc_linter/src/rules/oxc/only_used_in_recursion.rs @@ -304,6 +304,7 @@ fn is_argument_only_used_in_recursion<'a>( .semantic() .symbol_references(arg.symbol_id.get().expect("`symbol_id` should be set")) .peekable(); + // Avoid returning true for an empty iterator if references.peek().is_none() { return false;