airbnb/javascript

JavaScript Style Guide

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 23 minutes ago
Added to GitGenius on November 7th, 2023
Created on November 1st, 2012
Open Issues & Pull Requests: 163 (+0)
Number of forks: 26,595
Total Stargazers: 148,132 (+1)
Total Subscribers: 3,663 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 2.3 hours
Mean response time: 144.6 days
90th percentile: 55.1 days
Tracked items: 144

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 97% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Only 10% of issues opened in the past year have been closed. Three people close 82% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 103
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 2,432 days
Stale 30+ days: 102
Stale 90+ days: 98

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • question (292)
  • invalid (290)
  • pull request wanted (81)
  • editorial (61)
  • react (47)
  • needs eslint rule change/addition (26)
  • enhancement (25)
  • semver-patch: loosen/fix/document rules (13)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

The Airbnb JavaScript Style Guide is a comprehensive style guide repository that establishes coding standards and best practices for JavaScript development. It serves as a reference document for developers writing JavaScript code, with a focus on modern ECMAScript standards from ES2015 onwards. The guide assumes developers are using Babel for transpilation and requires the babel-preset-airbnb package or equivalent, along with airbnb-browser-shims or similar polyfill solutions for browser compatibility.

The repository covers an extensive range of JavaScript topics organized into detailed sections. These include guidance on primitive and complex types, variable declarations with preferences for const and let over var, object and array literal syntax, destructuring patterns, string conventions using single quotes, function and arrow function best practices, class and constructor patterns, module systems, iterators and generators, property access, variable scoping and hoisting, comparison operators and equality checks, control flow statements, commenting standards, whitespace and formatting rules, comma and semicolon usage, type casting and coercion, naming conventions, accessor patterns, event handling, and jQuery usage when applicable. The guide also addresses ECMAScript 5 compatibility considerations and provides extensive coverage of ES2015 and later features.

The repository maintains connections with other major projects including Microsoft's VSCode and TypeScript repositories as well as the Rust language repository, suggesting its influence extends across the broader developer tooling ecosystem.

The guide is available in multiple languages and includes related style guides for React, CSS-in-JavaScript, CSS and Sass, and Ruby. It provides an ES5 deprecated version for legacy projects and includes sections on testing, performance optimization, and resources for further learning. The repository also documents real-world usage examples and maintains an amendments section for tracking changes and improvements to the guide over time. The style guide emphasizes ESLint integration throughout, with specific ESLint rule references provided for most recommendations to enable automated enforcement of the coding standards.