Our JavaScript Style Guide

About Harrison Shoff

Check it out on Github: https://github.com/airbnb/javascript

Everyone writes JavaScript a little differently. We finally decided it was time that we got together and agree on how we write JavaScript.

We describe it as a mostly reasonable approach to JavaScript.

We’re releasing it under the MIT license, so please feel free to fork and use at your will. We don’t expect everyone to agree with the way we do things, but we do hope this can help kick start your own style guide as a template or map of some sort.

Hope it helps!

Table of Contents

  1. Types
  2. Objects
  3. Arrays
  4. Strings
  5. Functions
  6. Properties
  7. Variables
  8. Hoisting
  9. Conditional Expressions & Equality
  10. Blocks
  11. Comments
  12. Whitespace
  13. Leading Commas
  14. Semicolons
  15. Type Coercion
  16. Naming Conventions
  17. Accessors
  18. Constructors
  19. Modules
  20. jQuery
  21. ES5 Compatability
  22. Testing
  23. Performance
  24. Resources
  25. The JavaScript Style Guide Guide
  26. Contributors
  27. License

 

0 comments

About Harrison Shoff

Speak Your Mind

*

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax