Skip to content

Conventions

LeroyBuchholz edited this page Jun 7, 2016 · 13 revisions

#Naming

less

File names

  • lower case with dashes

classes

  • lower case with underscores

Variables and Mixins

  • lower case with underscores

JavaScript

File names

  • lower case with dashes

Views

  • parent classes have to end on 'View'
  • child classes may not end on 'View'
  • same conventions for any functions which relate to view classes

Classes

  • begin with upper case, use CamelCase

Variables

  • begin with lower case, use camelCase

Imports

  1. first line: 'use babel'
  2. imports of external node.js libraries as consts, mark with leading i, go on with CamelCase, e.g. const iPackage = require('package');
  3. package internal imports, name of each import should be equal to the corresponding class
Clone this wiki locally