mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-31 03:49:11 +00:00
2.3 KiB
2.3 KiB
Workflow and repository conventions
Use for commands, imports, formatting, CI, dependencies, PRs.
Workspaces
Confirm names from package.json.
| Package | Workspace name |
|---|---|
| Client | ontime-ui |
| Server | ontime-server |
| Electron | ontime-electron |
| Resolver | @getontime/resolver |
| CLI | @getontime/cli |
| Shared types | ontime-types |
| Shared utilities | ontime-utils |
Run from repo root: pnpm --filter <workspace-name> <script>. Add/install workspaces only when required.
Verification
Start narrow; expand with risk:
focused test
-> affected package tests
-> package lint/typecheck
-> required repository checks
pnpm --filter ontime-ui test:pipeline <path-to-test>
pnpm --filter ontime-server test:pipeline <path-to-test>
pnpm --filter ontime-utils test:pipeline <path-to-test>
pnpm --filter <workspace-name> lint
pnpm --filter <workspace-name> typecheck
pnpm format:check
pnpm lint
pnpm typecheck
pnpm test
pnpm e2e
PR CI: .github/workflows/test.yml; runs format, lint, types, unit, Playwright. Run E2E locally only for key flows or E2E infrastructure.
Before code commit: pnpm lint, pnpm test; add pnpm typecheck for TypeScript and pnpm format:check for formatted files. Claim only observed results.
TypeScript and imports
- Strict TypeScript. Prefer
ontime-typesdomain types over local copies. - Keep client/server payloads aligned through
ontime-types. - Import
ontime-types/ontime-utilsfrom public entry points; Oxlint forbidssrcsubpaths. - Server relative ESM imports need
.js. - Reuse public exports/canonical helpers before adding utilities.
Formatting and dependencies
- Use Oxlint/Oxfmt, not ESLint/Prettier.
- Oxfmt: two spaces, semicolons, single quotes, trailing commas, 120 columns.
- Add dependencies only when platform/current stack cannot solve the need. Review
package.jsonandpnpm-lock.yamltogether. - Never hand-edit lockfile. No build output unless already tracked.
Pull requests
- Title:
[<workspace-name>] <Title>. - Separate behaviour from unrelated refactors/format churn.
- State what changed, why, verification.