idiomatic.js
Principles of Writing Consistent, Idiomatic JavaScript
Idiomatic.js is a style guide for writing clean, consistent JavaScript, a reference document teams adopt so all their code looks like it was written by one person, covering formatting, naming, and common patterns.
Idiomatic.js is a style guide — a written document, not a software tool — that lays out principles for writing JavaScript code that is clean, consistent, and readable. The core idea is simple: no matter how many different people work on a codebase, all the code should look as if one person wrote it. That means agreeing on things like how to format whitespace, how to name variables, how to structure functions, and how to handle common patterns in the language.
It works as a reference document rather than an automated enforcer. Developers read it, agree to follow its conventions for a project, and use linting tools like eslint or jshint (mentioned in the guide) to catch deviations automatically.
You would use this when starting a new JavaScript project and wanting to establish a shared coding standard, or when onboarding new team members and needing a common reference. It is especially useful in open-source projects where many contributors work on the same code. Idiomatic.js has been translated into many languages including German, French, Spanish, Korean, Japanese, Chinese, and more, making it accessible to a global audience. There is no specific runtime or framework required — these are language-level conventions applicable to any JavaScript project.
Where it fits
- Establish a shared coding standard at the start of a JavaScript project so all contributors write consistent code.
- Onboard new team members or open-source contributors with a single reference document for code style.
- Pair with eslint or jshint to automatically enforce the agreed conventions across a codebase.