Skip to content

Contribution guidelines

techfort edited this page Dec 17, 2014 · 5 revisions

Contribution guidelines

Overview

We try our best to adhere to the airbnb javascript style guidelines.

If you spot non compliant code in our codebase do not hesitate to flag it or even submit a pull request.

We do not ask that you agree with our guidelines but if you want to contribute you will have to respect them.

A few things we recommend

Most of these are included in the airbnb style guide but we feel like highlighting them:

  • use shortcuts in if conditions, and always follow with a statements in curly brackets. Do not do: if (something) return; instead do if (something) { return; }
  • Name callbacks, when possible try to declare them as functions that can be cached to save memory as well making your code more readable. i.e. instead of
result.filter(function () { /* ... */ });

try to do:

function doFilter(obj) {
  // ...
}
result.filter(doFilter);

A few things we will not accept

  • comma first
  • avoid-semicolon-at-all-cost stupidity
  • general hipster code
  • coffeescript

Clone this wiki locally