Problem Statement
The pre-commit hook (.husky/pre-commit) only runs lint-staged in the Backend directory. It does not run linting or type-checking for Frontend, Analytics, or Contracts (Rust). Issues in these workspaces are only caught in CI.
Evidence
.husky/pre-commit line 1: cd Backend && npx lint-staged
- No Frontend, Analytics, or Contract checks
Impact
CI fails on Frontend/Analytics/Contracts errors that could be caught locally. Slower feedback loop.
Proposed Solution
Extend pre-commit to:
- Run
cd Frontend && npx lint-staged
- Run
cd analytics && npx lint-staged
- Run
cd contracts && cargo check (only on changed .rs files)
Technical Requirements
- Must still run all checks even if one fails (report all errors)
- Must not slow down commits excessively (< 10 seconds)
- Must skip checks if no relevant files changed
Acceptance Criteria
- Changing a Frontend file triggers Frontend lint-staged
- Changing an Analytics file triggers Analytics lint-staged
- Changing a Rust file triggers cargo check
- All checks running in parallel
- Failure in one workspace does not skip other checks
File Inventory
Dependencies
None.
Testing Strategy
- Modify file in each workspace and verify pre-commit triggers
Security Considerations
Faster local validation reduces chance of vulnerable code reaching CI.
Definition of Done
Problem Statement
The pre-commit hook (
.husky/pre-commit) only runs lint-staged in the Backend directory. It does not run linting or type-checking for Frontend, Analytics, or Contracts (Rust). Issues in these workspaces are only caught in CI.Evidence
.husky/pre-commitline 1:cd Backend && npx lint-stagedImpact
CI fails on Frontend/Analytics/Contracts errors that could be caught locally. Slower feedback loop.
Proposed Solution
Extend pre-commit to:
cd Frontend && npx lint-stagedcd analytics && npx lint-stagedcd contracts && cargo check(only on changed .rs files)Technical Requirements
Acceptance Criteria
File Inventory
.husky/pre-commitDependencies
None.
Testing Strategy
Security Considerations
Faster local validation reduces chance of vulnerable code reaching CI.
Definition of Done