File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ # MCP TypeScript SDK Guide
2+
3+ ## Build & Test Commands
4+ ```
5+ npm run build # Build ESM and CJS versions
6+ npm run lint # Run ESLint
7+ npm test # Run all tests
8+ npx jest path/to/file.test.ts # Run specific test file
9+ npx jest -t "test name" # Run tests matching pattern
10+ ```
11+
12+ ## Code Style Guidelines
13+ - ** TypeScript** : Strict type checking, ES modules, explicit return types
14+ - ** Naming** : PascalCase for classes/types, camelCase for functions/variables
15+ - ** Files** : Lowercase with hyphens, test files with ` .test.ts ` suffix
16+ - ** Imports** : ES module style, include ` .js ` extension, group imports logically
17+ - ** Error Handling** : Use TypeScript's strict mode, explicit error checking in tests
18+ - ** Formatting** : 2-space indentation, semicolons required, single quotes preferred
19+ - ** Testing** : Co-locate tests with source files, use descriptive test names
20+ - ** Comments** : JSDoc for public APIs, inline comments for complex logic
21+
22+ ## Project Structure
23+ - ` /src ` : Source code with client, server, and shared modules
24+ - Tests alongside source files with ` .test.ts ` suffix
25+ - Node.js >= 18 required
You can’t perform that action at this time.
0 commit comments