Style Guide

May 25, 2016 ยท View on GitHub

JavaScript

Two documents of interest:

Settings for your editor:

  • 80 columns max
  • 2-space indents, not tabs
  • No trailing whitespace, no extraneous linefeeds
  • Newline at end of file

Linting

Use the Closure linter to lint and automatically fix some errors (of certain types).

# Fix regular errors (missing goog.require/provide, etc)
anvil build :fixstyle

# Run full lint
anvil build :lint