News for hackers. Stuff that matters.
Re:A Prettier JavaScript Formatter by overcast on Tuesday January 10, 2017 @02:21PM (#13368010)
It's almost crazy to think this already isn't just a thing. Why is this just coming to a head now, after all these years of carrying on over code formatting?
Re:A Prettier JavaScript Formatter by kajecounterhack on Tuesday January 10, 2017 @02:35PM (#13368156)
Many communities have been using their own solutions for it for a while (e.g pylint / pep8 if you've used Python, clang-format for C++, js-beautify for javascript, etc) and many companies use "linter as style enforcer" but you still need to watch out for some things that linters don't catch in most languages.

FWIW if you use vim, this plugin is great: https://github.com/google/vim-codefmt

Re:A Prettier JavaScript Formatter by mrgoldenbrown on Tuesday January 10, 2017 @04:01PM (#13368938)
I'm not convinced it is just coming to a head now. I've seen automatic/forced formatting on projects at least as far back as 2000, when I entered the workforce.
Re:A Prettier JavaScript Formatter by djeikyb on Tuesday January 10, 2017 @10:16PM (#13371453)
The ones I've used for java have been consistently bad though. Autoformat as a commit hook leads to ugly code. Granted, I mean "bad" as in "gets ya 75% of the way".
Re:A Prettier JavaScript Formatter by overcast on Tuesday January 10, 2017 @04:04PM (#13368964)
Yes, forced/automated based on that company standards. I'm referring more to universal.
Re:A Prettier JavaScript Formatter by nine_k on Tuesday January 10, 2017 @02:28PM (#13368074)
I bet you heard of "go fmt".
Re:A Prettier JavaScript Formatter by overcast on Tuesday January 10, 2017 @02:40PM (#13368191)
Right, but that's a single relatively new language.