Skip to content

Coding Conventions

Juliet Shin edited this page May 16, 2025 · 6 revisions

Development requirements

All development must follow a mobile-first approach.

Test your code

As the codebase grows, testing ensures features work as expected and prevents regressions. We use:

  • React Testing Library with Jest for unit tests.
  • Cypress for functional (end-to-end) testing.

Unit test requirements

  • Minimum 85% test coverage is required.
  • All unit tests must pass before submitting a PR.
  • Include accessibility tests using jest-axe.

Coding Style & Conventions

  • Build for both mobile and desktop devices.
  • Follow the style guidelines in app/[locale]/styleguide.
  • Use Sass and CSS Modules to scope styles and avoid collisions.
  • Code formatting is enforced via .editorconfig.

GitHub Branching Overview

We follow a simple branching model:

  • main: stable production-ready code
  • development: active development (features, bug fixes)

Currently all feature and bug-fix branches should branch off development.

Pull Request reviews

To submit a PR, branch from development and ensure the following criteria are met:

PR Checklist

✅ Manual testing is complete

✅ Works on mobile and desktop

✅ Works in all supported browsers:

  • Chrome
  • Firefox
  • Safari
  • Microsoft Edge

✅ Unit tests:

  • Cover new functionality (≥ 85% coverage)
  • All existing tests pass

✅ Accessibility:

  • Run jest-axe in your tests
  • Use browser tools like WAVE to detect issues
  • Test with keyboard navigation
  • Test with a screen reader (e.g., VoiceOver on macOS)