Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Your style guide doesn't appear to be limiting nesting depth. Bad style guide! Bad!
-
@ManuLG I won't downvote you for it, but I would consider it a bad habit to do that by default. To me it seems like your control structures are way too long.
If the code is generic, it should be refactored into a reusable method. If you see an "else", you should do an early return. In JS, you can create promises and higher order functions, you rarely need to nest more than 2 levels deep. -
Look at all the sad faces in that picture. They are suffering more than anyone else
-
crisz81917yI use a plugin for vscode which transforms paired brackets with the same color. Anyways it's always better avoid the callback hell at all. If you are using node, you can consider using utils.promesify()
Related Rants
This is what i consider to be true horror...
undefined
js