I know that the golden rules for formating code are clarity and consistency. I have found a few tips and words of advice in Crockford’s book, but no real reference thoroughly discussing the issue.
Is there an online reference or book that goes through code style (tabulation, spacing, line breaks, comments, etc.) in a consistent and methodic way?
Not specific to Javascript, but I’ve yet to see a book that handles code style (which can be applied to any language) better than Robert Martin’s Clean Code.