-
Notifications
You must be signed in to change notification settings - Fork 0
Naming Conventions
Paulius Juzenas edited this page Oct 11, 2025
·
2 revisions
Bellow is a summary of the different naming conventions used.
All variables, functionas and class instances should use camelCase. Class types should use PascalCase as is usual.
Types should be PascalCase. Preferrably with descriptive name like Props, UserWithMemberships or ImageCursor. Generics may be named single letters like T, U or R. However, if there are many they should have more explanatory names.
| File Ending | Convention |
|---|---|
.ts |
Is the file meant to export one thing then PascalCase, otherwise camelCase. Unless its one of the predefined Next.js files. |
.tsx |
Always PascalCase. |
.prisma |
Always camelCase. |
.scss |
Should follow the conventions of the .tsx file it is related to. If its not related to any it it should follow camelCase. |
Folder names use camelCase unless they are part of a url. Then, it is kebab-case. For the special Next.js names like slugs ([username]) the variable inside shoud use camelCase.