Skip to content

Contributing

  • Node.js >= 24 (see engines in root package.json) The pre-commit hook runs automatically via nano-staged. It:

  • Lints and formats staged JS/TS files (oxlint --fix + oxfmt)

  • Typechecks web, API, and anchor workspaces when any .ts files are staged (tsgo --noEmit)

  • Checks .rs files with cargo fmt --check + cargo clippy

To skip the hook temporarily:

Terminal window
git commit --no-verify

To keep conflicts low and history clean, follow this flow for every change:

main (local) ──► branch ──► commits ──► pull main ──► push ──► PR ──► merge ──► pull main

Start by making sure your local main is up to date with the remote.

Terminal window
git checkout main
git pull --rebase origin main

Branch name should describe the work — feat/, fix/, docs/ prefixes preferred.

Terminal window
git checkout -b feat/my-change

Make your changes and commit with a clear message.

Terminal window
git add <files>
git commit -m "feat: add my change"

Before pushing, pull the latest main into your branch to catch any conflicts early. This keeps the merge trivial.

Terminal window
git pull --rebase origin main

Resolve any conflicts if they appear, then commit the merge.

Terminal window
git push origin feat/my-change

Open a PR against main. Draft PRs are fine for early feedback.

After review and CI passes, merge into main (squash or rebase as preferred).

Update your local main after the merge.

Terminal window
git checkout main
git pull --rebase origin main

Then repeat from step 1 for the next change.