Development

January 30, 2025 ยท View on GitHub

Note:

Requirements

  • Node.js: use the version referenced in .nvmrc file. For nvm users, just run nvm use for the repository root.
  • npm: use the version associated to the node version.
  • Supported OS Windows/Linux/macOS (see the GitHub Build workflow for more details)

Build

Tests

See the testing page

Code style

Your patch should follow the same conventions & pass the same code quality checks as the rest of the project.

Project, in major line, follows the code style suggested by airbnb which is explicit and well documented.

Typescript was chosen because it's strongly typed, and we believe it adds some syntactical benefits to the JavaScript language. More information here: Typescript

To enforce best practices we use ESLint and husky. The latter performs lint checks on pre-commit event to make sure that committed code meets standards.

Husky settings when using Node Version Managers

On commit, if you use a Node Version Manager, the pre-commit hook may generate an Command not found error. If so, create a startup file and add the following content (this example is given for Linux or macOS when using nvm):

# This loads nvm.sh and sets the correct PATH before running hook
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

For more details, see

Typescript

Although Linting, Sonar and Tests keeps the code in a good shape.

To write code that conforms to best practices, we strongly recommend that you review the following resources: