EC System

JavaScript coding conventions

We follow the most widely adopted JavaScript Style Guide: Airbnb JavaScript Style Guide. It helps us follow good practices and avoid some errors.

Prettier

Upon that, we use prettier which removes all original styling and ensures that all outputted JavaScript conforms to a consistent style.

ECL configuration

Thus, our eslint-config-ecl extends both eslint-config-airbnb-base and eslint-config-prettier.

Automatically format the code and fix errors

On every git commit, a hook is called and runs the following commands:

  "*.js": [
    "prettier-eslint --write",
    "git add"
  ],

It formats your JavaScript using prettier followed by eslint --fix.