Development Guidelines for Javascript

Use NPM and Gulp

There is no constraint over which development environment people use.
However, the build tools are NPM and Gulp. So, use them.

Before every commit or pull request, run…

gulp dist

Follow Google’s linter

This linter is configured by default in our build tools.
It verifies the code is formatted correctly. Unlike what we do with Java, code formatting is very strict in our Javascript projects.

Git Commit Messages

This section is widely inspired (and partially copied) from Atom.io’s web site.

Squash your Commits

Sometimes, and for whatever reason, it takes several commits to solve an issue.
To improve the readability and the history browsing, it is better to squash your commits when you can.

Squashing means merging contiguous commits into a single one.
Squashing should be ONLY be done on forks. They are acceptable on pull requests provided they have not yet been accepted (git push -force will be necessary then).

To squash your commits, we suggest you follow this very good tutorial from the web.