CODE_REVIEW_GUIDELINES.md
This document provides specific guidelines for LLM agents performing code reviews on the Actual Budget codebase. These guidelines help maintain code quality, consistency, and follow the project's design principles.
Do NOT add new settings for every little UI tweak.
Actual Budget follows a design philosophy that prioritizes simplicity and avoids settings bloat. Before introducing code that adds new settings:
Do NOT approve code that adds new @ts-strict-ignore comments.
The project uses strict TypeScript checking via typescript-strict-plugin. Adding @ts-strict-ignore comments undermines type safety. Instead, review should encourage:
Do NOT approve code that adds new eslint-disable or oxlint-disable comments.
Linter rules are in place for good reasons. Instead of suppressing them:
Prefer x satisfies SomeType over x as SomeType for type coercions.
The satisfies operator provides better type safety by:
Exception: If you truly need to assert a type that TypeScript cannot verify (e.g., runtime type guards), use as but require a comment explaining why it's safe.
any and unknownFlag code that uses any or unknown unless absolutely necessary.
The use of any or unknown should be rare and well-justified. Before approving:
packages/loot-core/src/types/Only approve any or unknown if there's a documented, exceptional reason (e.g., interop with untyped external libraries, gradual migration).
All user-facing strings must be translated.
The project has custom ESLint rules (actual/no-untranslated-strings) that enforce i18n usage, but reviewers should actively flag untranslated strings:
Trans component instead of t() function when possibleMinimize mocked dependencies; prefer real implementations.
When reviewing tests, encourage the use of real implementations over mocks:
Over-mocking makes tests brittle and less reliable. Real implementations provide better confidence that code works correctly.
Standalone financial numbers should have tabular number styles applied.
FinancialText or styles.tnum should be applied directly if wrapping is not possible