Function style: Prefer function, allow for arrow functions for closures #8963
mikkurogue
started this conversation in
Rule suggestion
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
My team uses Biome and we now manually enforce a rule that we prefer to use
function myFunc()overconst myFunc = () => {}for functions that are not callbacks or part of closures like inarr.map(fn).I am not sure if there is an easy to also detect if the function is a callback signature or closure, but I would assume some configuration is also possible with AST parsing for things like making sure
map, filter, reduce, findetc (the more common uses, omitted for brevity) would be covered.Beta Was this translation helpful? Give feedback.
All reactions