wiki:Documentation/DevelopingForXinha/StyleGuide

Version 1 (modified by nicholasbs, 10 years ago) (diff)

--

Code Style Guide

This page is meant to provide some basic coding practices and style guidelines for developers working on Xinha.

  1. Don't use tabs. Instead, indent code blocks with two spaces.
  1. Always use semicolons after curly brackets (see #1326). E.g.,
    var foo = function() {
      alert('foo');
    };
    
  1. Always use var when declaring variables, unless you really do mean to create a global variable.