File Naming Conventions: A Guide for Every Project Type
5 min read
File naming conventions vary by project type, framework, and team preference. This guide covers the most common patterns.
By Project Type
| Project | Convention | Examples |
|---|---|---|
| React/Next.js components | PascalCase | UserProfile.tsx |
| Vue components | PascalCase | UserProfile.vue |
| Angular components | kebab-case | user-profile.component.ts |
| Python modules | snake_case | data_loader.py |
| CSS/SCSS | kebab-case | main-layout.scss |
| Config files | kebab-case | eslint-config.js |
| Documentation | kebab-case or UPPERCASE | getting-started.md, README.md |
Universal Rules
- No spaces in file names — ever
- Lowercase is safer across OS (Linux is case-sensitive, macOS isn't)
- Avoid special characters except hyphens and underscores
- Be consistent within a project