Replies: 1 comment 4 replies
|
Not that I've come across, but I'm a bit curious why you'd prefer that. Yes with the way you are declaring your functions hoisting will take care of it, but it can simply get confusing especially for anyone else that ends up working in your code when functions are used before they are declared. It's also not compatible with ES6's block level bindings so it would limit your capabilities or require a lot of rearranging to refactor later. I'm not here to tell you how you to write your code, just want to give you a heads up that I'm not the only one that feels this way! |
4 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.
Is there any rule or plugin that would be function definitions at the end of their scope? Ideally with autofix
https://stackoverflow.com/questions/69869636/eslint-rule-to-always-put-functions-at-the-end
All reactions