From 40bcf7f6acff1cfeb3d415e8237252b8b935a9a9 Mon Sep 17 00:00:00 2001 From: gorkem-bwl Date: Mon, 27 Apr 2026 23:50:01 -0400 Subject: [PATCH] docs: align CONTRIBUTING.md and CLAUDE.md with current toolchain CONTRIBUTING.md: surface format-check + build in code guidelines and the PR checklist so contributors run the same verifications the project enforces locally. CLAUDE.md: correct stale test framework reference (Mocha+Chai+Sinon -> Jest) and update the test file glob to server/test/**/*.test.ts. --- CLAUDE.md | 11 ++++++----- CONTRIBUTING.md | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 9af1a6742..244dcfe8f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -25,7 +25,7 @@ cd server npm install npm run dev # Start with hot-reload (nodemon + tsx) at http://localhost:52345 npm run build # TypeScript compile + path alias resolution -npm run test # Run Mocha tests with c8 coverage +npm run test # Run Jest tests with coverage npm run lint # ESLint v9 npm run lint-fix # Auto-fix lint issues npm run format # Prettier formatting @@ -174,12 +174,13 @@ t('your.key') // Never hardcode UI strings - Both use ESLint with strict settings ### Testing -Server tests use Mocha + Chai + Sinon: +Server tests use Jest (with `--experimental-vm-modules` for ESM): ```bash -npm test # Run all tests with coverage -npm test -- --grep "pattern" # Run specific tests +npm test # Run all tests with coverage +npm test -- -t "pattern" # Run tests matching name pattern +npm test -- path/to/file.test.ts # Run a specific file ``` -Test files: `server/tests/**/*.test.js` +Test files: `server/test/**/*.test.ts` ## Database Models diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ce12f6711..9f0b5f0ca 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -283,7 +283,7 @@ Follow the [pull request checklist](#pull-request-checklist). Your PR should: ## Code guidelines -- Use ESLint and Prettier (`npm run lint`). +- Use ESLint and Prettier. Run `npm run lint` and `npm run format-check` in both `client` and `server`. If `format-check` reports issues, fix them with `npm run format` before committing. - Follow naming conventions: `camelCase` for variables, `PascalCase` for components, `UPPER_CASE` for constants. - No hard-coded strings — use `t('your.key')` for everything visible. - Use the shared theme and components. No magic numbers or hardcoded styles. @@ -304,7 +304,7 @@ Before submitting your pull request, please confirm the following: - You used the shared theme for any styling — no magic numbers or inline styles. - The pull request addresses only one issue or topic. - You added screenshots or a video for any UI-related changes. -- Your code passes linting and has no TypeScript errors. +- Your code passes `npm run lint`, `npm run format-check`, and `npm run build` in both `client` and `server` with no errors. If one or more of these are missing, we may ask you to update your pull request before we can merge it.