Skip to content

Instantly share code, notes, and snippets.

@lrvick
Created July 16, 2012 23:19
Show Gist options
  • Save lrvick/3125750 to your computer and use it in GitHub Desktop.
Save lrvick/3125750 to your computer and use it in GitHub Desktop.
Lance's Code Style Guide

Version Control

Commit messages

Authorship

  • Please only commit code that you actually wrote.
  • If it was written by someone else and that project has a git repo, make a submodule
  • If it was written by someone else and does not have a project to submodule then commit that file as the original author with git commit --author='John Bleh [email protected]'

Code Quality

  • No tabs, EVER. Lance will find you, tie you to a tree, cover you in honey, then laugh at you as ants and bears consume your flesh.
  • If you see other people that have violated coding standards please feel free to update their code. "Leave the campsite better than you found it". You may also yell at the person that did it, and make them fix it. Either way.

Javascript

We use the NPM JavaScript style guide, verbatim.

See http://npmjs.org/doc/coding-style.html

Python

We use the PEP8 Style Guide, verbatim.

See: http://www.python.org/dev/peps/pep-0008/

HTML/CSS

All HTML/CSS code must adhere to W3 validation with the exception of browser specific prefixes like webkit-* mozilla-*

HTML Validator: http://validator.w3.org/

CSS Validator: http://jigsaw.w3.org/css-validator/

Beyond the scope of these basic validators, HTML/CSS code should adhere to Google style conventions as defined here:

http://google-styleguide.googlecode.com/svn/trunk/htmlcssguide.xml

Less

As much as possible where CSS conventions apply, adhere to:

http://google-styleguide.googlecode.com/svn/trunk/htmlcssguide.xml

We have not yet found a suitable styleguide specifically for less. When something in the Google styleguide does not apply directly to less markup, adhere to conventions found in the Twitter Bootstrap project, which is one of the most adopted uses of less we know of.

See: https://github.com/twitter/bootstrap/tree/master/less

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment