Repository navigation
Add a lint rule to prevent arrow functions #8216
jeremytenjo
started this conversation in
Ideas
Replies: 1 comment
|
I'm also interested in this. something like func-style |
0 replies
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.
Hi team,
I’d like to request a new lint rule for Biome: a rule that disallows arrow functions and enforces the use of traditional function declarations or expressions instead.
Reasoning:
• Some codebases prefer function syntax for consistency, readability, or hoisting behavior.
• Other linters (ESLint, etc.) offer rules like func-style or custom no-arrow-functions logic; having a native Biome rule would help teams migrating to Biome maintain their existing standards.
• This would allow stronger enforcement in large or stylistically strict projects.
Requested behavior:
• Flag any usage of () => {} or expression-body arrow functions.
• Provide autofix when possible (e.g., converting simple arrows to named or anonymous functions).
Let me know if this is something that fits the project direction. Happy to help provide examples or test cases if useful.
Thanks!
All reactions