TypeScript Development Standards
<metadata>- Scope: TypeScript projects (frontend or backend)
- Load if: Working with TypeScript
- Prerequisites: @smith-principles/SKILL.md, @smith-standards/SKILL.md
CRITICAL: Path Aliases (Primacy Zone)
<required>Configure path aliases in test config - Vite's ~ and @ aliases need explicit test runner setup.
Path Aliases in Test Config
<context>Vite-based projects use ~ and @ as path aliases. Test runners need explicit configuration.
// vitest.config.ts or jest.config.ts
resolve: {
alias: {
'~': projectRoot,
'@': projectRoot,
},
}
</examples>
Test File Organization
<required>- Place tests adjacent to source in
__tests__/directories - Use consistent extension (
.spec.tsor.test.ts)
Type Checking
<context>Framework CLIs may provide enhanced type checking. Match CI configuration for consistency.
</context>Claude Code LSP (Experimental)
<context>LSP plugins exist but are currently broken (race condition in initialization):
typescript-lsp@claude-plugins-officialpyright-lsp@claude-plugins-official
When fixed, LSP provides: goToDefinition, findReferences, hover, documentSymbol, getDiagnostics
Workaround: Use Serena MCP for language server features (find_symbol, find_referencing_symbols)
@smith-tests/SKILL.md- Testing standards@smith-dev/SKILL.md- Development workflow@smith-serena/SKILL.md- Serena MCP for language server features
ACTION (Recency Zone)
<required>Before running tests:
- Configure path aliases in vitest/jest config
- Match CI type-checking configuration
- Place tests in
__tests__/adjacent to source