diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 4ed049da..00000000 --- a/.prettierrc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "singleQuote": true, - "semi": true, - "tabWidth": 2, - "printWidth": 120, - "trailingComma": "es5", - "endOfLine": "lf" -} diff --git a/CLAUDE.md b/CLAUDE.md index c687d520..fd69da62 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -90,7 +90,7 @@ Codeman is a Claude Code session manager with web interface and autonomous Ralph | Continuous typecheck | `tsc --noEmit --watch` | | Watch-mode test | `npm run test:watch -- test/.test.ts` (always pass a file — bare watch includes the browser suites) | | Test coverage | `npm run test:coverage` | -| Dead-code sweep | `npm run knip` (config in `knip.json`) | +| Dead-code sweep | `npm run knip` (config in `config/knip.json`, passed via `--config`) | | Rebuild gesture overlay | `npm run build:gesture` (esbuild `packages/gesture-control/src/codeman/entry.ts` → `src/web/public/gesture/gesture-codeman.js`; commit the result) | | Build the docker agent image | `node scripts/build-agent-image.mjs` (builds `codeman/agent:base` from `docker/agent.Dockerfile`; prerequisite for Docker cases; `--engine`/`--image`/`--no-cache`) | | Gesture playground | `npm run dev` **in** `packages/gesture-control/` (standalone vite demo, fake tabs) | @@ -102,7 +102,7 @@ Codeman is a Claude Code session manager with web interface and autonomous Ralph **CI**: `.github/workflows/ci.yml` (push to master/main + PRs, Node 22) runs two jobs: **(1)** `check:lockfile`, `typecheck`, `lint`, `check:frontend-syntax`, `format:check`, then a **server boot smoke test** (`tsx src/index.ts web --port 3151` must answer `/api/status` within 30s); **(2)** the **unit/integration test suite** via `npm run test:ci` (`config/vitest.ci.config.ts` — excludes the browser-driven `test/mobile/**` suite, `perf-*` benchmarks, and 3 Playwright tests). Tests are tmux-safe in CI: `TmuxManager` no-ops all shell commands under `VITEST` (see Testing). -**Code style**: Prettier (`singleQuote: true`, `printWidth: 120`, `trailingComma: "es5"`). ESLint flat config (`config/eslint.config.js`) allows `no-console`, warns on `@typescript-eslint/no-explicit-any`. Ignores: `app.js`, `scripts/**/*.mjs`, `src/web/public/vendor/**`, `scripts/remotion/**`. +**Code style**: Prettier (`singleQuote: true`, `printWidth: 120`, `trailingComma: "es5"`) — config lives in the **`"prettier"` key of `package.json`**, not a `.prettierrc` (keeps the repo root short; editors read it natively). `.prettierignore` stays at the root because Prettier resolves it relative to cwd. ESLint flat config (`config/eslint.config.js`) allows `no-console`, warns on `@typescript-eslint/no-explicit-any`. Ignores: `app.js`, `scripts/**/*.mjs`, `src/web/public/vendor/**`, `scripts/remotion/**`. **Prettier scope is deliberately narrow.** `npm run format` globs only `src/**/*.ts` and `src/web/public/**`, and `.prettierignore` then exempts most of `src/web/public/*.js` (app.js, styles.css, index.html, and 14 hand-formatted modules) plus `CLAUDE.md`. Those files are hand-formatted by design; `npm run check:public-assets` and `check:frontend-syntax` are what guard them (NUL bytes + JS syntax), not Prettier. Do not "fix" a file by adding it back to Prettier's scope. diff --git a/knip.json b/config/knip.json similarity index 100% rename from knip.json rename to config/knip.json diff --git a/package.json b/package.json index a3e8e483..be7457a6 100644 --- a/package.json +++ b/package.json @@ -32,9 +32,17 @@ "changeset": "changeset", "version-packages": "changeset version && npm install --package-lock-only && node scripts/check-lockfile-sync.mjs", "check:lockfile": "node scripts/check-lockfile-sync.mjs", - "knip": "npx --yes knip@latest", + "knip": "npx --yes knip@latest --config config/knip.json", "release": "changeset publish" }, + "prettier": { + "singleQuote": true, + "semi": true, + "tabWidth": 2, + "printWidth": 120, + "trailingComma": "es5", + "endOfLine": "lf" + }, "workspaces": [ ".", "packages/*"