Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Airbnb’s JavaScript Style Guide

DZone's Guide to

Airbnb’s JavaScript Style Guide

See how one of the more successful startups in silicon valley manages their JavaScript.

· Web Dev Zone ·
Free Resource

Learn how error monitoring with Sentry closes the gap between the product team and your customers. With Sentry, you can focus on what you do best: building and scaling software that makes your users’ lives better.

Airbnb, a website for people to list, find, and rent lodging, has published its style guide for Javascript development on GitHub: https://github.com/airbnb/javascript/blob/master/README.md

They talk about:

  1. Types
  2. References
  3. Objects
  4. Arrays
  5. Destructuring
  6. Strings
  7. Functions
  8. Arrow Functions
  9. Constructors
  10. Modules
  11. Iterators and Generators
  12. Properties
  13. Variables
  14. Hoisting
  15. Comparison Operators & Equality
  16. Blocks
  17. Comments
  18. Whitespace
  19. Commas
  20. Semicolons
  21. Type Casting & Coercion
  22. Naming Conventions
  23. Accessors
  24. Events
  25. jQuery
  26. ECMAScript 5 Compatibility
  27. ECMAScript 6 Styles
  28. Testing
  29. Performance
  30. Resources
  31. In the Wild

Here’s what they say about this guide:

Everyone writes JavaScript a little differently. We finally decided it was time that we got together and agreed 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!

-- https://github.com/airbnb/javascript/wiki/The-JavaScript-Style-Guide-Guide

What’s the best way to boost the efficiency of your product team and ship with confidence? Check out this ebook to learn how Sentry's real-time error monitoring helps developers stay in their workflow to fix bugs before the user even knows there’s a problem.

Topics:
javascript ,style guides

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}