mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
ad7c139992
This PR puts our contributing guidelines in the sidebar of the unleash documentation. Currently there was no way of navigating to them easily, which made our contribution guides and ADRs less useful. This PR adds them to the sidebar as their own category, and adds an ADR for domain centric language. Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
22 lines
1.1 KiB
Markdown
22 lines
1.1 KiB
Markdown
---
|
|
title: "ADR: Naming"
|
|
---
|
|
|
|
## Background
|
|
|
|
In the codebase, we have found a need to have a common way of naming things in order to ensure consistency. It's important that files are named after the contents of the file to ensure that it's easy to search for files. You should be able to find the file you need in the command line without the help of advanced IDEs. This can easily be solved by proper naming. It's also crucial that the naming is consistent across the project, if we are using different naming conventions in different places, it will be hard to navigate the codebase.
|
|
|
|
## Decision
|
|
|
|
We have decided to use a naming convention where the files are named after the main class that it contains. Example:
|
|
|
|
```js
|
|
feature-toggle-service.ts
|
|
|
|
class FeatureToggleService {
|
|
...
|
|
}
|
|
```
|
|
|
|
The reason for this decision is to remove mental clutter and free up capacity to easily navigate the codebase. Knowing that a file is named after the class that it contains allows you to quickly scan a file without watching for a context where the class is used in order to understand what it is.
|