> For the complete documentation index, see [llms.txt](https://docs.prestashop-project.org/1-6-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.prestashop-project.org/1-6-documentation/english-documentation/developer-guide/coding-standards/javascript-coding-standards.md).

# JavaScript Coding Standards

## Introduction <a href="#javascriptcodingstandards-introduction" id="javascriptcodingstandards-introduction"></a>

For our JavaScript code, we chose to follow the well-detailed and documented [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript). Code should be written in ECMAScript 6 and Babel will transpile it into ECMAScript 5 for a wider browser compatibility.

Some noteworthy rules:

* Always use semicolons at the end of an instruction.
* Use soft tabulations with two spaces to indent.
* Use braces with all multi-line blocks.

```
(function () {
  if (test) {
    return false;
  }
}());
```

Do not hesitate to look at their [complete documentation](https://github.com/airbnb/javascript).
