The rule of thumb is this: write it down in English then camelCase it.
weightKgs
, volumePints
, FoodRepositoryMemory
, FoodRepositoryMongoDb
), so files are listed according to the name of the entity.Uppercase
. Others, like constants, environment variables, variables, methods, file and folder names etc. can all follow the general rule and be camelCased (simple rule, easy to follow and makes a pretty file list).userId
vs user
), an entity or instance (User
vs user
), a service (UserService
vs User
), a response (InvoiceCreatedResponse
vs Created
), etc.CoffeeMug
is perfectly natural and readable while ICoffeeMug
is not. It will be evident from the usage that it is a type definition (you don't add class
or function
to the name either).timeSeconds
vs time
), for example.bananaResolver.ts
, User.ts
. File lists then become very easy to read and understand..class.ts
.DatePicker.tsx
is pretty good, for the same component Date.tsx
is not so much. Another example would be dateFromTimestamp.ts
vs date.ts
.