Contributing
Contributing
Section titled “Contributing”Prerequisites
Section titled “Prerequisites”-
Node.js >= 24 (see
enginesin rootpackage.json) The pre-commit hook runs automatically vianano-staged. It: -
Lints and formats staged JS/TS files (
oxlint --fix+oxfmt) -
Typechecks web, API, and anchor workspaces when any
.tsfiles are staged (tsgo --noEmit) -
Checks
.rsfiles withcargo fmt --check+cargo clippy
To skip the hook temporarily:
git commit --no-verifyTo keep conflicts low and history clean, follow this flow for every change:
main (local) ──► branch ──► commits ──► pull main ──► push ──► PR ──► merge ──► pull mainStep by step
Section titled “Step by step”1. Pull latest main
Section titled “1. Pull latest main”Start by making sure your local main is up to date with the remote.
git checkout maingit pull --rebase origin main2. Create a branch off main
Section titled “2. Create a branch off main”Branch name should describe the work — feat/, fix/, docs/ prefixes preferred.
git checkout -b feat/my-change3. Commit on your branch
Section titled “3. Commit on your branch”Make your changes and commit with a clear message.
git add <files>git commit -m "feat: add my change"4. Pull main again (assurance)
Section titled “4. Pull main again (assurance)”Before pushing, pull the latest main into your branch to catch any conflicts early. This keeps the merge trivial.
git pull --rebase origin mainResolve any conflicts if they appear, then commit the merge.
5. Push branch
Section titled “5. Push branch”git push origin feat/my-change6. Open a Pull Request
Section titled “6. Open a Pull Request”Open a PR against main. Draft PRs are fine for early feedback.
7. Merge
Section titled “7. Merge”After review and CI passes, merge into main (squash or rebase as preferred).
8. Pull main locally
Section titled “8. Pull main locally”Update your local main after the merge.
git checkout maingit pull --rebase origin mainThen repeat from step 1 for the next change.