|
| 1 | +#Coder Extension Development Guidelines |
| 2 | + |
| 3 | +##Build and Test Commands |
| 4 | + |
| 5 | +- Build:`yarn build` |
| 6 | +- Watch mode:`yarn watch` |
| 7 | +- Package:`yarn package` |
| 8 | +- Lint:`yarn lint` |
| 9 | +- Lint with auto-fix:`yarn lint:fix` |
| 10 | +- Run all tests:`yarn test` |
| 11 | +- Run specific test:`vitest ./src/filename.test.ts` |
| 12 | +- CI test mode:`yarn test:ci` |
| 13 | + |
| 14 | +##Code Style Guidelines |
| 15 | + |
| 16 | +- TypeScript with strict typing |
| 17 | +- No semicolons (see`.prettierrc`) |
| 18 | +- Trailing commas for all multi-line lists |
| 19 | +- 120 character line width |
| 20 | +- Use ES6 features (arrow functions, destructuring, etc.) |
| 21 | +- Use`const` by default;`let` only when necessary |
| 22 | +- Prefix unused variables with underscore (e.g.,`_unused`) |
| 23 | +- Sort imports alphabetically in groups: external → parent → sibling |
| 24 | +- Error handling: wrap and type errors appropriately |
| 25 | +- Use async/await for promises, avoid explicit Promise construction where possible |
| 26 | +- Test files must be named`*.test.ts` and use Vitest |