git404hub

airbnb/javascript

148,113JavaScriptAudience · developerComplexity · 1/5MaintainedLicenseSetup · easy

tl;dr

A widely-adopted style guide for writing consistent, readable JavaScript code. Covers naming, formatting, and best practices with examples and ESLint rules.

vibe map

mindmap
  root((repo))
    What it does
      Defines code conventions
      Prevents inconsistency
      Enforces via ESLint
    Key topics
      Variables and types
      Functions and classes
      Modules and imports
      Modern ES6+ syntax
    Use cases
      Team code standards
      Linting configuration
      Learning best practices
    Tech stack
      JavaScript
      ESLint
      Babel
      Node.js
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what people make with this

VIBE 1

Set up a consistent code style for your team by adopting Airbnb's conventions and ESLint config.

VIBE 2

Enforce JavaScript best practices automatically in CI/CD pipelines using eslint-config-airbnb.

VIBE 3

Learn modern JavaScript patterns and why certain approaches are preferred over others.

VIBE 4

Reference specific rules when code reviewing to explain why a change improves readability or maintainability.

stack

JavaScriptESLintBabelNode.js

setup vibes

Difficulty · easy time til it works · 5min
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

in plain english

This repository is the Airbnb JavaScript Style Guide, which the README itself calls a mostly reasonable approach to JavaScript. In plain terms, it is a long, opinionated document telling JavaScript developers how to write their code so that everyone on a team writes it the same way. It is not a library you install, it is a set of rules and short before-and-after examples you read and apply when you write or review code. The guide is organized as a big table of contents covering Types, References, Objects, Arrays, Destructuring, Strings, Functions, Arrow Functions, Classes and Constructors, Modules, Iterators and Generators, Properties, Variables, Hoisting, Comparison Operators, Blocks, Control Statements, Comments, Whitespace, Commas, Semicolons, Type Casting, Naming Conventions, Accessors, Events, jQuery, ES5 Compatibility, ES6+ styles, Standard Library, Testing, Performance, and Resources. Each rule shows a bad and a good example with brief reasoning, and often links to a corresponding ESLint rule that automatically enforces it, the README notes the npm packages eslint-config-airbnb and eslint-config-airbnb-base built on these rules. A note at the top assumes you are using Babel, with babel-preset-airbnb or equivalent, and shims like airbnb-browser-shims. Sister style guides for React, CSS-in-JavaScript, CSS and Sass, and Ruby are linked from this one. You would actually use it when starting a new JavaScript project that needs consistent style, when joining a team that already follows it, or as a teaching reference for modern JavaScript habits. The tech stack is JavaScript itself, with ESLint and Babel as the main companion tools mentioned by the README.

prompts (copy fr)

prompt 1
Show me how to set up eslint-config-airbnb in my project and configure it to match the Airbnb JavaScript style guide.
prompt 2
Explain the difference between const, let, and var according to the Airbnb style guide and when to use each one.
prompt 3
How does the Airbnb guide recommend writing arrow functions versus regular functions? Give me examples.
prompt 4
What does the Airbnb style guide say about naming conventions for variables, functions, and classes?
prompt 5
Set up a pre-commit hook to automatically lint my JavaScript files against the Airbnb style guide.
peek the repo → explain another one

← airbnb on gitmyhub — every repo by this author, as a profile.

double-check against the repo, no cap.