diff --git a/CLAUDE.md b/CLAUDE.md index c267348a..a5a38694 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -130,6 +130,7 @@ Never duplicate logic across handlers or services. If the same behaviour is need - Naming: `camelCase` for variables/functions, `PascalCase` for classes - No `var` — use `const`/`let` only - **JSDoc required** on all public functions — `jsconfig.json` enables `checkJs` globally (equivalent to `@ts-check` on every file) +- Always us static/js/core/types.js to mapp OxCcloud API structure - Type parameters, return types, and complex types via `@typedef`: ```js @@ -162,6 +163,17 @@ Never duplicate logic across JS modules. If the same behaviour is needed in more - One CSS file per logical component in `/static/css/` - [data-theme="dark"] is permitted only in /static/css/themes/dark.css +## Frontend Pre-commit checks + +Always run these before committing, in this order: + +```bash +biome check --fix # Auto-format +biome lint --fix # Lint (must pass) +stylelint static/css/ # Css rules +tsc -p jsconfig.json --noEmit # Ensure JS is always typed +``` + # What Claude must NOT do - Edit `Cargo.lock` directly - Use npm dependencies not listed in this file