Naming Conventions - aaroncox/stashwars GitHub Wiki

While the general coding conventions can be a bit loose among different developers, naming conventions should usually stay consistent through out a project.

Below are the observed naming convention seen (so far) in our project. Please add more as we move along.


So far, there are 3 types.

  1. camelCaseWithLowerFirstLetter
  2. all-lower-hyphen-separated
  3. all_lower_underscore_separated

Certain phrases can be considered as one word (i.e. username, battletag, etc.)

HTML

  • Class: all-lower-hyphen-separated
  • Id: all-lower-hyphen-separated
  • Template Name: all_lower_underscore_separated

MeteorJS

  • Session Variable: camelCaseWithLowerFirstLetter
  • Template Helper: all_lower_underscore_separated
  • Template Variable: camelCaseWithLowerFirstLetter
  • Model/Collection Name: all-lower-hyphen-separated

Not Sure?

Whenever you are not sure which convention to use or if you need to mix it up a little (to emphasize the uniqueness of a variable), just go by your instinct.