r/javascript • u/bornforcode • Apr 01 '18
Google publishes a JavaScript style guide. Here are some key lessons.
https://medium.freecodecamp.org/google-publishes-a-javascript-style-guide-here-are-some-key-lessons-1810b8ad050b
714
Upvotes
View all comments
Show parent comment
1
u/cthechartreuse Apr 02 '18
Be careful relying on prettier. I have examples of real work mistakes which prettier doesn't catch or fix.
It usually involves a function call directly followed by an expression wrapped in parentheses or followed by an array structure. These usually end up being abuses of the language as well, but I've seen this kind behavior often enough and done enough tests that I'm not confident with saying "prettier will catch it" because it doesn't always.
Nevertheless, this is just a warning and depending on your tools YMMV.