Naming Conventions
Consistency in naming folders and files is critical for project readability and maintainability. All contributors must follow the same convention defined at the start of the project.
Rules
- Each project defines a single naming convention for folders and files during the initialization phase.
- The chosen convention must be documented in the project's setup guide or README.
- When working with a template that already provides a naming convention, the team must follow that convention.
- New files or folders must never mix different conventions within the same project.
Examples of conventions
- Folders:
kebab-caseuser-profile/,auth-service/,api-client/
- React components:
PascalCaseUserCard.tsx,LoginForm.tsx,HeaderBar.tsx
- Hooks:
camelCaseprefixed withuseuseAuth.ts,useModal.ts,useUserProfile.ts
- Utilities/helpers:
camelCasedateFormatter.ts,apiFetcher.ts,stringUtils.ts
- Constants:
SCREAMING_SNAKE_CASEAPI_BASE_URL.ts,DEFAULT_PAGE_SIZE.ts