- Build:
npm run build(builds client and server) - DO NOT RUN THIS EVER, it will crash the machine - Type Check:
npm run typecheck(expect 1 baseline error) - run this instead ofnpm run buildto validate changes - Tests:
npm test(all tests) ornpx vitest run test/filename.test.ts(single test) - Lint:
npm run lintornpm run lint:fix - Format:
npm run prettier(ALWAYS run after making a series of code changes) - Dev Server:
npm run test-interactive(port 3030) ornpm run dev(port 5173 with hot reload) - DO NOT RUN THIS EVER, it will crash the process, always ask for manual testing
DO NOT run git commit, that will be done manually.
- Imports: ES6 modules (
import/export), use.jsextensions for local imports - Formatting: Prettier with single quotes, 60 char line width
- Types: TypeScript with interface for objects, type for unions/primitives, prefer explicit types
- Naming: camelCase for variables/functions, PascalCase for components/types, UPPER_CASE for constants
- React: Functional components with hooks, React 18 (no import React in JSX)
- Error Handling: Prefer try/catch, log errors with
console.error, use status/error state patterns - Comments: Use JSDoc for public APIs, inline comments for complex logic
- Files: Organize by feature in
src/client/andsrc/server/,index.tsfor exports
- Reference .github/copilot-instructions.md for build commands and validation
- Run
npm run prettierbefore every commit - Validate changes by starting server and testing in browser at http://localhost:3030
- Known baseline: 4 test failures, 1 TypeScript error (do not introduce new ones)