Skip to content

Latest commit

 

History

History
128 lines (85 loc) · 4.47 KB

File metadata and controls

128 lines (85 loc) · 4.47 KB

Contributing to VolleyBro

Thank you for contributing! This guide covers everything you need to know before opening a PR.


Branch & PR Workflow

  • Branch naming: feature/<description> or fix/<description>
  • All feature/fix branches merge to dev (not main)
  • PR title: English
  • PR body: English description + zh-TW summary appended at the bottom
  • No AI attribution in commits or PRs (no Co-Authored-By: Claude, no "generated by Claude")

Conventional Commits

All commit messages must follow Conventional Commits (Angular variant).

Format:

<type>(<scope>): <short description>

Types:

Type When to use
feat A new feature
fix A bug fix
docs Documentation only changes
refactor Code change that neither fixes a bug nor adds a feature
test Adding or correcting tests
chore Maintenance tasks (deps, config, tooling)
build Changes to build system or external dependencies
ci Changes to CI configuration
perf Performance improvements
style Formatting changes only (no logic change)

Examples:

feat(team): add player invitation flow
fix(game): correct set score calculation on substitution
docs(contributing): add branch naming convention
refactor(ui): extract ItemFooter into standalone component
test(usecases): add coverage for CreateRecord edge cases
chore(deps): upgrade mongoose to v8
perf(game): reduce rally list re-renders with memoization
style(components): apply prettier formatting to team directory

Code Style

This project follows the Airbnb JavaScript Style Guide enforced via ESLint and Prettier.

Before submitting:

pnpm lint             # must pass with zero warnings
pnpm typecheck        # must pass with zero errors

Key conventions:

  • File naming: kebab-case for components, .usecase.ts for use cases, .mongo.ts for repository implementations
  • Variables/functions: camelCase; booleans: is/has/can prefix; event handlers: handle prefix; constants: UPPER_SNAKE_CASE
  • Path aliases: @/* for absolute imports from src/

Testing

Consult docs/testing-strategy.md before writing tests. It covers:

  • Which testing school (Classical vs London) applies per Clean Architecture layer
  • What to mock vs. keep real at each layer
  • Frontend testing split: Jest for behavioral tests, Storybook + Chromatic for visual regression
  • Story coverage requirements per component layer

Run the full suite before opening a PR:

pnpm test

Versioning

This project uses Changesets for version management. When submitting a PR that includes a user-visible change or version bump, run:

pnpm changeset

Select the bump type (patch/minor/major), then write the changeset body in Keep-a-Changelog format. The body becomes the CHANGELOG.md entry directly — write it for humans, not machines.

Format:

### Changed

#### Infrastructure

- Migrate package manager from npm to pnpm

Use only these ### headings: Added, Changed, Deprecated, Removed, Fixed, Security. Add #### domain sub-headings (e.g. Team, Game, CI, Infrastructure) when entries span multiple areas.

Omit internal refactors, test additions, linting fixes, and dep upgrades with no user-visible effect. Always include toolchain changes that affect contributor setup.

Commit the generated .changeset/*.md file along with your changes. PRs that omit a changeset when required will not trigger an automated version PR.

Agent users: the writing-changelog skill is available in this project to guide changeset authoring.


Dependency Maintenance

Consult docs/maintenance-policy.md when upgrading dependencies. It covers:

  • Major version bump workflow (dedicated branch, migration guide, full suite verification)
  • Mock drift: verifying mock surfaces after upgrading mocked dependencies