6 Style Guides for JavaScript, including Google, GitHub, AirBnB...

NicolasBrondinBernard

Author
@NicolasBrondinBernard

To find a convention that suits you, or to build your own!

Article published on 02/04/2021, last updated on 10/08/2026

Standard Style Guide

More than just a naming and style convention, "Standard" is a complete module including a configuration, a linter, as well as an automatic formatter that you can run with a single command.

It is recommended in the documentation to run it automatically before your tests, but you can also automate it before every commit by following this tutorial.

This is the convention shared by the largest number of private players in the industry, such as GitHub, NPM, TypeForm, Heroku, MongoDB, and many others.

Link to the style guide: https://github.com/standard/standard

Google Style Guide

In addition to providing a style guide for Javascript, Google provides a complete list of the styleguides used internally for languages like TypeScript, HTML/CSS, C++, C#,... But also for frameworks like Angular.

Link to the style guide: https://google.github.io/styleguide/

AirBnB Style Guide

AirBnB's style guide is one of the most popular, and also offers conventions for classic CSS, CSS-in-JS, Ruby, as well as for React.

Link to the style guide: https://github.com/airbnb/javascript

Idiomatic Style Guide

In addition to being a simple style guide, idiomatic.js offers you a list of tools (test engines,...) to improve the quality of your code, and doesn't just focus on best practices, but also on bad practices to avoid, and why to avoid them.

Link to the style guide: https://github.com/rwaldron/idiomatic.js

Clean Code Style Guide

If you've read the book "Clean Code" by Robert C. Martin (also known as uncle Bob), you might be surprised to discover that his guidelines have been reworked and adapted for Javascript by a developer named Ryan Mc Dermott.

As he himself writes, this isn't a style guide, but a list of guidelines (best practices), which remain very interesting to read.

Link to the style guide: https://github.com/ryanmcdermott/clean-code-javascript

Douglas Crockford Style Guide

Somewhere between a style guide and best practices, Douglas Crockford's list of code conventions hasn't been up to date for quite a while now, but I thought it was interesting to share the rules from the creator of the language himself!

Link to the style guide: https://www.crockford.com/code.html

I hope this article was useful to you, and see you soon on the blog!


Finished reading this article?
Our newsletter

No spam. Only free content, news, and ever more resources to level up your skills!

Join +1500 developers

Comments (0)

to leave a comment

No comments yet