Airbnb vs Google vs StandardJS: Comparing JavaScript Style Guides
A style guide is a set of written rules about how JavaScript code should look and be structured — quote style, naming conventions, when to use arrow functions, and dozens of smaller decisions. Several widely used guides exist, and most teams pick one instead of inventing their own from scratch.
Airbnb JavaScript Style Guide
One of the most detailed and widely adopted guides in the ecosystem. It's opinionated and thorough, covering everything from variable declarations to React-specific conventions in its extended version. Many ESLint configurations are built directly on top of it (eslint-config-airbnb), which makes it easy to adopt without writing rules from scratch.
Google JavaScript Style Guide
Google's guide is similarly detailed but slightly more conservative in places, and it grew out of a large, mixed codebase that needed to stay consistent across many teams and tools. It's a solid choice if you want a well-documented, battle-tested rationale behind each rule rather than just a list of do's and don'ts.
StandardJS
StandardJS takes the opposite approach from the other two: zero configuration. You install it and it enforces its rules — no semicolons, single quotes, two-space indentation — with no options file to argue over. The trade-off is exactly the flexibility you give up: if you disagree with a rule, there's no setting to change it.
How they compare
- Configurability: Airbnb and Google allow overrides; StandardJS deliberately does not.
- Semicolons: Airbnb and Google require them; StandardJS omits them.
- Adoption effort: StandardJS is fastest to set up; Airbnb and Google require more initial configuration but offer more control later.
- Best fit: StandardJS for small projects that want zero decisions; Airbnb or Google for larger teams that want documented, adjustable conventions.
Style guides vs formatters
None of these guides format your code by themselves — they're paired with a linter (usually ESLint) to enforce the rules, and often a formatter like Prettier to handle layout automatically. Whichever guide you pick, you can still use the JS formatter on this site to apply consistent indentation, quotes and semicolons that match your chosen convention. For more on how linting and formatting divide the work, see ESLint vs Prettier.