2 ms·
The goal should be to do whatever makes the code read nicely, instead of forcing a single pattern which won’t work well in very case. Destructuring where two f
by vaughan 5y ago
The goal should be to do whatever makes the code read nicely, instead of forcing a single pattern which won’t work well in very case.
Destructuring where two funcs in the same scope return the same named object key will make your code harder to read for example.
Function options split across multiple lines also make things harder to read and make it less able to fit logic on a single screen.
I prefer less verbose code if I can have my function calls as single lines <80 char wide with self-documenting names that read like recipe instructions as to what is going on step by step.
Prettier’s line splitting makes things less readable a lot of the time. I use prettier-ignore quite a bit.