Skip to content

Latest commit

 

History

History
86 lines (61 loc) · 3.22 KB

CONTRIBUTING.md

File metadata and controls

86 lines (61 loc) · 3.22 KB

Recommended tools

Conventions

Files

Filenames must follow the kebab-case.

Commit messages

This project follows conventional commits to standardize commit messages. Therefore, all commit messages should be formatted using the following scheme:

type(optional scope): subject

The available types are:

  • feat: a new feature
  • fix: a bug fix
  • refactor: changes that neither fix a bug nor add a feature
  • test: adding or fixing tests
  • perf: changes improving performance
  • build: changes affecting the build system
  • ci: changes to CI configuration files and scripts
  • docs: documentation changes
  • style: a linting or formatting commit
  • revert: a reversion of a previous commit
  • release: a commit that updates the version of the project, preparing it to a new release
  • chore: a commit that does not fit any of the types above

Pull requests

Pull requests must target canary. As with commit messages, pull request titles must follow the conventional commits convention:

type(optional scope): subject (#<task-id>)

Example: feat(parser): add ability to parse arrays (#47)

  • After creating a pull request, the CI action will configure a remote testing environment and run unit and integration tests. It's a good practice to wait until all checks have passed before requesting a review.

  • After your pull request is reviewed and you've made the necessary changes, click "Mark as resolved" on the resolved discussions and ask the reviewer(s) to re-review your pull request.

Branch organization

  • main as the production branch, containing the production version of the project
  • canary as the default and development branch, containing the latest version of the project

Branch development

<task-id>-<subject-in-kebab-case>

Example: 82-session-persistence

  • Before adding a commit, Husky is configured to automatically format your code.

  • Before pushing to GitHub, Husky will automatically perform a static analysis and run unit and integration tests.

Folders

The recommended file structure is as follows, to keep local resources and tests closer to the main file:

{filename}
 ├─ {filename}.ts
 ├─ constants.ts
 ├─ types.ts
 ├─ __tests__
 │   ├─ {filename}.test.ts
 │   └─ **/*.test.ts
 └─ **/*.ts                // local files, utilities and other abstractions