-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use default parameters instead of thernary operator #20
Comments
As an aside, code 400 is Bad Request, not Unauthorized so that should be corrected as well |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
While using this repository as an example to build my app, I saw an opportunity to contribute cleaning the code.
Default parameters are often cleaner than shorting circuiting (or thernary operator, in this case).
So, if this is a problem in this case, please, let me know.
Bad:
white-label/src/core/infra/BaseController.ts
Lines 34 to 36 in 503ee49
Good:
Reference:
https://github.com/ryanmcdermott/clean-code-javascript#use-default-parameters-instead-of-short-circuiting-or-conditionals
The text was updated successfully, but these errors were encountered: