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
The existing code style with if/then and other such constructs such as multiple returns per function/method is counter intuitive and prone to error and thus not up to par with what one would call clean code standard, when done properly.
So we need to enforce a single exit point per function/method where possible and also make sure that all for/do/while/if/then/else/try/catch/finally clauses are discriminated by opening and closing curly brackets, always.
The text was updated successfully, but these errors were encountered:
I agree with the proposal and to use a consistent style that's why the eslint was introduced.
Although I do not agree with the single exit point per function proposal, I believe that puts a bigger cognitive load on the reader. I would rather focus on the length of the functions and break down the overgrown ones to smaller and then compose them.
The existing code style with if/then and other such constructs such as multiple returns per function/method is counter intuitive and prone to error and thus not up to par with what one would call clean code standard, when done properly.
So we need to enforce a single exit point per function/method where possible and also make sure that all for/do/while/if/then/else/try/catch/finally clauses are discriminated by opening and closing curly brackets, always.
The text was updated successfully, but these errors were encountered: