Coding Standards
TypeScript (CLI/Core/Shared/Web)
- Strict Mode: All packages must execute in TypeScript strict mode.
- Async/Await: Prefer async/await over raw Promises.
- Typing:
- Explicitly define return types for exported functions.
- Use
interfaceovertypefor object definitions where possible. - Avoid
any- useunknownif type is truly uncertain.
- Linting: We use ESLint with Prettier. Run
npm run lintbefore committing.
Kotlin (Android Client)
- Style: Follow the official Kotlin style guide.
- Compose:
- Composable functions should use PascalCase.
- State should be hoisted where possible.
- Use
Modifieras the first optional parameter.
- Async: Use Coroutines for asynchronous operations.
Commit Messages
We use Conventional Commits to automate versioning and changelogs.
Format: <type>(<scope>): <subject>
Types:
feat: New feature (minor release)fix: Bug fix (patch release)docs: Documentation onlyrefactor: Code change that neither fixes key nor adds featuretest: Adding missing testschore: Tooling/build changes
Examples:
feat(cli): add --verbose flagfix(core): handle disconnect race conditiondocs(readme): update installation steps