Skip to content

Style Guide

Mark Mendell edited this page Jul 4, 2016 · 2 revisions
  • 2 space indent
  • 80 character max width
  • camelCase variables and functions
  • lowercasenospace module/file names
  • hyphen-between-words for html ids and classes
  • header comment on every function or global variable
  • logic organized in separate files
  • each file interfaces through single global variable with same name as file
  • only add functions needed outside of the file to the exported module object
  • put private global variables in a private globals object
  • one blank line between functions

Clone this wiki locally