Coding standards

Standards and conventions for TypeScript CLI projects using Jules workflows. Follow these guidelines to keep code consistent, reviewable, and aligned with the repository's existing patterns.

Naming Conventions

Variables & Functions

  1. 1Use camelCase for local variables, function parameters, and function names.
  2. 2Use PascalCase for types, interfaces, enums, and classes.
  3. 3Use UPPER_SNAKE_CASE for constants and environment variable references.
  4. 4Boolean variables should use is, has, or should prefixes.

Files & Directories

TypeScript Guidelines

Documentation

  1. 1Public functions require JSDoc with @param and @returns.
  2. 2Internal helpers: JSDoc optional, but add a one-line comment if intent is non-obvious.
  3. 3Avoid documenting what the code already says — document why, not what.

Error Handling

Testing

PR Checklist