Filenames
By default, filenames should match the name of the declaration being exported, but in kebab-case. Common exceptions include:
Page-related files
page.tsx, layout.tsx
(filenames are lowercase)
Types/Interfaces
the file is often named
types.ts
and will export multiple local types
Schemas
the file is often named
schemas.ts
and will export multiple local schemas
Constants
the file is often named
constants.ts
and will export multiple local constants
Pages
We follow the NextJS v13+ folder structure [1][2]
Components
kebab-case, .tsx
Non-Components
kebab-case, .ts
(generally)
Last updated