You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Paulius Juzenas edited this page Oct 11, 2025
·
2 revisions
Bellow is a summary of the different naming conventions used.
Variables, Functions and Classes
All variables, functionas and class instances should use camelCase. Class types should use PascalCase as is usual.
Types
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 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
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.