Airbnb’s JavaScript Style Guide
See how one of the more successful startups in silicon valley manages their JavaScript.
Join the DZone community and get the full member experience.
Join For FreeAirbnb, 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:
- Types
- References
- Objects
- Arrays
- Destructuring
- Strings
- Functions
- Arrow Functions
- Constructors
- Modules
- Iterators and Generators
- Properties
- Variables
- Hoisting
- Comparison Operators & Equality
- Blocks
- Comments
- Whitespace
- Commas
- Semicolons
- Type Casting & Coercion
- Naming Conventions
- Accessors
- Events
- jQuery
- ECMAScript 5 Compatibility
- ECMAScript 6 Styles
- Testing
- Performance
- Resources
- 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
Published at DZone with permission of Singaram Subramanian, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments