Repository navigation
Description
Problem
Our current file naming convention uses a mixed approach that differs from modern industry standards:
Current Convention:
- TypeScript source files:
camelCase.ts(e.g.,databaseWriteQueue.ts,nodeReferenceService.ts) - Test files:
kebab-case.test.ts(e.g.,database-write-queue.test.ts) - Svelte components:
kebab-case.svelte
Industry Standard (2024-2025):
- All TypeScript files:
kebab-case.ts - Reason: Cross-platform safety, package naming compatibility, framework alignment
Background
Our convention was established in January 2025 during a comprehensive file naming migration (Phase 3). However, recent research shows that kebab-case for all files is now the dominant pattern in modern TypeScript projects due to:
- Cross-platform safety: Avoids issues with case-insensitive filesystems (Mac/Windows)
- Package naming: npm packages must be lowercase
- Framework alignment: SvelteKit, Next.js, and other modern frameworks recommend kebab-case
- Ecosystem consistency: Most 2024-2025 TypeScript guides favor kebab-case
References
- File naming conventions for modern JS/TS projects (Dec 2024)
- SvelteKit community recommendations
- Code review feedback on PR Implement code review feedback from PR #179 #180
Proposed Change
Update all TypeScript source files from camelCase.ts to kebab-case.ts:
# Examples:
databaseWriteQueue.ts → database-write-queue.ts
nodeReferenceService.ts → node-reference-service.ts
contentEditableController.ts → content-editable-controller.tsScope
Files to Rename (~25-30 files)
/src/lib/services/*.ts(~19 files)/src/lib/utils/*.ts(~5 files)- Other utility/service TypeScript files
Files Already Correct
- ✅ All test files (already kebab-case)
- ✅ All Svelte components (already kebab-case)
- ✅ Documentation files (already kebab-case)
Implementation Tasks
- Update file naming convention documentation (
/docs/architecture/development/standards/file-naming-conventions.md) - Update ESLint rules to enforce kebab-case for TypeScript files
- Modify
eslint.config.jsto requirekebab-casefor.tsfiles (not just.svelte) - Keep exceptions for
index.ts,.d.ts,.test.ts
- Modify
- Create migration script to rename files using
git mv(preserves history) - Update all import statements to use new file names
- Run full test suite to verify no breakage
- Update
bun run quality:fixto catch any issues - Document migration in changelog/release notes
Benefits
- Industry alignment: Matches 2024-2025 TypeScript best practices
- Consistency: Single naming rule for all TypeScript files
- Cross-platform safety: Eliminates potential case-sensitivity issues
- Developer experience: Matches expectations from modern TypeScript developers
- Framework alignment: Consistent with SvelteKit community norms
Migration Strategy
Phase 1: Preparation
- Update documentation
- Update ESLint configuration
- Create automated migration script
Phase 2: Execution
- Run migration script (using
git mvto preserve history) - Update all imports automatically
- Verify all tests pass
Phase 3: Validation
- Run
bun run quality:fixto ensure compliance - Manual smoke testing
- Update any remaining references in documentation
Estimated Effort
- Documentation + ESLint: 1-2 hours
- Migration script: 2-3 hours
- Execution + validation: 1-2 hours
- Total: 4-7 hours
Priority
Low-Medium - This is a quality-of-life improvement and alignment with industry standards. Current naming works fine, but updating would improve consistency and match developer expectations.
Related
- Original file naming migration: Phase 3 (January 2025)
- File naming conventions doc:
/docs/architecture/development/standards/file-naming-conventions.md - PR Implement code review feedback from PR #179 #180 code review feedback
Note: This issue is for future consideration and does not block current development. The team should discuss and decide if/when to implement this change.
Activity
Align TypeScript file naming to industry standard (kebab-case)
Align TypeScript file naming to industry standard (kebab-case)
Align TypeScript file naming to industry standard (kebab-case)
Fix inline import() type references to use kebab-case paths
Align TypeScript file naming to industry standard (kebab-case) (#186)
Align TypeScript file naming to industry standard (kebab-case) (#186)
Align TypeScript file naming to industry standard (kebab-case) (#186)
Align TypeScript file naming to industry standard (kebab-case) (#186)