Open hoylemd opened 12 years ago
My ideas:
Javascript:
braces should be on their own lines whenever possible
lines should not be longer than 80 characters
When creating objects, use closures to hide as much object data as possible
camel-case all identifiers
operators should have one space on either side
indentation is to be done with tab characters (reccommend width of 4 characters to ease reading and staying under the 80 character limit)
The global scope is not to be used except for our top-level object "dd" Everything should be a subelement of dd.
HTML:
No javascript code should be present in an .html file. put them in their own files
javascript files should be included through script tags at the bottom of the html page.
CSS:
Every attribute should be on it's own line.
compound attributes are allowed.
No spaces between attribute names, ":", values, and ";"
{ / } on their own lines
Javascript files should be included in the
tag as is common convention. No javascript is run outside of what begins inside the window.onload() function to ensure everything has loaded first.No block-level or inline elements outside of
(this means we have to move your "Press arrow keys to move" into the )All code blocks should have curly braces, including what would normally be short-ifs and next-line functions.
e.g., if (x=1) { x++; }
This is a discussion on coding standards for this project