Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Style Guide

We ask that developers respect the following guidelines when contributing pull requests to Enyo.


The Enyo source code uses leading tabs for indentation of code.


First curly brace at end of line, final curly brace on a line by itself:

for (var i=0; i<100; i++) { // first curly brace at end of line
} // final curly brace on a line by itself

Always use curly braces:

// bad
if (x) foo(); 

// good
if (x) {

Else clauses have the else keyword between the braces:

if (x) {
} else if (y) {
} else {


We use a like-English rule whenever possible. For example, no spaces on the inside of associations, and one space after a colon:

var x = (x + 7) * 3;
var y = {neft: "zap"};
var z = [1, 2, 3, (4 + 5)];

Single space after any keyword, except function:

for (var i=0; i<100; i++) {

while (x = 3) {

x = function() {


For code commenting guidelines, see Documenting Code for the API Viewer.

Something went wrong with that request. Please try again.