- Build:
bun run build(builds all packages via turbo) - Lint:
bun run lint(runs biome check) - Lint fix:
bun run lint:fix(runs biome check --write) - Format:
bun run format(runs biome format --write) - Test:
bun run test(runs all tests) - Single test:
cd packages/test-js && bun test <test-file.test.ts>(Bun test runner) - CI:
bun run ci(lint + build + test) - Version bump:
cd packages/scripts && bun run version <semver>(updates package.json files + composer.json + lock file)
- Bump version:
cd packages/scripts && bun run version X.Y.Z - Rebuild dist:
bun run build - Verify:
bun run ci - Commit all changes:
chore(release): vX.Y.Z - Push:
git push - Create GitHub release:
gh release create vX.Y.Z(this creates the git tag and triggers npm publish via.github/workflows/publish-npm.yml)
- Use Biome for linting and formatting: 100 char width, single quotes, no semicolons, 2 spaces, trailing commas (ES5)
- TypeScript: Avoid
any(warn level), use explicit types for exports - Imports: Use
.tsextensions in import paths (e.g.,from './types.ts') - Naming: camelCase for functions/variables, PascalCase for types/interfaces (prefix
Ifor interfaces,Tfor type aliases) - Error handling: TypeScript strict mode, no explicit any unless necessary
- Exports: Named exports only (no default exports)
- Files: One primary export per file matching filename (e.g.,
getCountryData.tsexportsgetCountryData) - Format: Run
bun run formatbefore committing (enforced by lefthook pre-commit hook) - Code should be clear and self-explanatory as much as possible
- Do not write any documentation unless it was asked for
- Do not write unnecessary comments in code, unless: code is not obvious, URLs should be linked to the issue, docs etc