mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
50fb671b66
* docs: add ADRs
* docs/adrs
* fix: update developer guide
* fix: add space
* Update website/docs/contributing/backend/overview.md
Co-authored-by: Ivar Conradi Østhus <ivar@getunleash.ai>
* docs: remove auto-generated sidebar
This should've been in .gitignore, but has only been ignored to the
ignore file for the website subdirectory. (This has been fixed on main.)
* docs: delete empty file
* Revert "docs: delete empty file"
This reverts commit 2435f173ff
.
* docs: add frontmatter to new dev docs
* Docs(fix): add quotes around page titles
In yaml, the colon is a special character, so we need to use quotes.
* docs: fix remaining titles
* Update website/docs/contributing/backend/overview.md
Co-authored-by: Ivar Conradi Østhus <ivar@getunleash.ai>
* fix: update empty ADR
* fix: update text to reflect postgres 12
* fix: update backend overview
* fix: remove link
* fix: add form ADR
Co-authored-by: Ivar Conradi Østhus <ivar@getunleash.ai>
Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
24 lines
799 B
Markdown
24 lines
799 B
Markdown
---
|
|
title: "ADR: Interface naming"
|
|
---
|
|
|
|
## Background
|
|
|
|
In the codebase, we have found a need to have a common way of naming interfaces in order to ensure consistency.
|
|
|
|
## Decision
|
|
|
|
We have decided to use a naming convention of appending the letter `I` in front of interfaces to signify that we are in fact using an interface. For props, we use `IComponentNameProps`.
|
|
|
|
```jsx
|
|
// Do:
|
|
interface IMyInterface {}
|
|
interface IMyComponentNameProps {}
|
|
|
|
// Don't:
|
|
interface MyInterface {}
|
|
interface MyComponentName {}
|
|
```
|
|
|
|
The reason for this decision is to remove mental clutter and free up capacity to easily navigate the codebase. Knowing that an interface is prefixed with `I` allows you to quickly scan a file without watching for a context where the interface is used in order to understand what it is.
|