You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
💅 noUnusedVariables misses an arrow function that only references itself #11950
exportfunctionf(){functiong(){returng();}// reportedleth=()=>h();// not reportedconstk=function(){returnk();};// reported}
A function declaration or function expression that is only referenced from its own body is reported as unused, but the same pattern with an arrow function is not. ESLint's no-unused-vars reports all three.
Reproduced with the 2.5.14 CLI and in the playground (f74eb38).
Expected result
h is reported as unused, like g and k.
Code of Conduct
I agree to follow Biome's Code of Conduct
Tool Use Disclaimer: Claude Code using Anthropic Opus 5.5 helped build the reproduction.
How can k possibly be considered used if its only referenced by itself?
This is yet another example of a pattern used in game modding more than standalone applications. When we inject via Proxy into another class, then replace its functions and __proto__, we end up with ugly code like this, where we've replaced one of its methods (for example, a recursive method); but from the outside, there would be no way to know whether we were or were not referenced.
This happens in FlowerLoader for example, where we inject over the game's MAIN class via Proxy, then have to override main.g creations via __proto__ and constructor, (g being the game loop in that engine); which then calls itself every update.
It's... again, I would easily accept this as "not biome's problem, out of scope" if it doesn't have an obvious solution.
Activity
AlbinoGeek commentedon Sep 25, 2026
These last 6 came specifically from projects I just updated from typescript-eslint lol.
dyc3 commentedon Sep 25, 2026
How can
kpossibly be considered used if its only referenced by itself?AlbinoGeek commentedon Sep 25, 2026
This is yet another example of a pattern used in game modding more than standalone applications. When we inject via
Proxyinto another class, then replace its functions and__proto__, we end up with ugly code like this, where we've replaced one of its methods (for example, a recursive method); but from the outside, there would be no way to know whether we were or were not referenced.This happens in FlowerLoader for example, where we inject over the game's
MAINclass viaProxy, then have to overridemain.gcreations via__proto__andconstructor, (gbeing the game loop in that engine); which then calls itself every update.It's... again, I would easily accept this as "not biome's problem, out of scope" if it doesn't have an obvious solution.
dyc3 commentedon Sep 25, 2026
Oh I misread this. If eslint catches all of these and we don't thats definitely a bug.
AlbinoGeek commentedon Sep 25, 2026
Yeah, I tried to make sure and test
typescript-eslintbehaviour for each of the newest issues.Update dependency @biomejs/biome to v2.5.15 (#51)
Update dependency @biomejs/biome to v2.5.15 (#25)
Update dependency @biomejs/biome to v2.5.15 (#1775)