Files
tspublish/.serena/memories/code_style_conventions.md

31 lines
1016 B
Markdown

# Code Style and Conventions
## Naming Conventions
- Interfaces prefixed with `I` (e.g., `ITsPublishJson`)
- Types prefixed with `T` (when applicable)
- All filenames in lowercase
- Class files named as `classes.<classname>.ts`
- Test files named as `test.<name>.ts` or `*.both.ts`, `*.node.ts`, `*.browser.ts`
## Import Style
- Module dependencies imported via `ts/plugins.ts`
- Use full path references: `plugins.myModule.myClass()`
- Import TypeScript files directly in tests, never compiled JavaScript
## Code Patterns
- Async/await preferred over callbacks
- Classes for main logic (TsPublish, PublishModule)
- Centralized logging via `logging.ts`
- Plugins pattern for external dependencies
## TypeScript Conventions
- Use type annotations
- Export classes and functions explicitly
- Module exports through index.ts
- Interfaces in separate interfaces/ directory
## File Organization
- Source code in `ts/` directory
- Tests in `test/` directory
- Compiled output in `dist_ts/`
- No uppercase in filenames