mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-30 05:43:55 +00:00
ignore: update AGENTS.md
This commit is contained in:
parent
57532326f7
commit
f0830a74bb
11
AGENTS.md
11
AGENTS.md
@ -11,7 +11,7 @@
|
|||||||
- Prefer single word variable names where possible
|
- Prefer single word variable names where possible
|
||||||
- Use Bun APIs when possible, like `Bun.file()`
|
- Use Bun APIs when possible, like `Bun.file()`
|
||||||
|
|
||||||
# Avoid let statements
|
### Avoid let statements
|
||||||
|
|
||||||
We don't like `let` statements, especially combined with if/else statements.
|
We don't like `let` statements, especially combined with if/else statements.
|
||||||
Prefer `const`.
|
Prefer `const`.
|
||||||
@ -31,7 +31,7 @@ if (condition) foo = 1
|
|||||||
else foo = 2
|
else foo = 2
|
||||||
```
|
```
|
||||||
|
|
||||||
# Avoid else statements
|
### Avoid else statements
|
||||||
|
|
||||||
Prefer early returns or using an `iife` to avoid else statements.
|
Prefer early returns or using an `iife` to avoid else statements.
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ function foo() {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
# Prefer single word naming
|
### Prefer single word naming
|
||||||
|
|
||||||
Try your best to find a single word name for your variables, functions, etc.
|
Try your best to find a single word name for your variables, functions, etc.
|
||||||
Only use multiple words if you cannot.
|
Only use multiple words if you cannot.
|
||||||
@ -73,3 +73,8 @@ const fooBar = 1
|
|||||||
const barBaz = 2
|
const barBaz = 2
|
||||||
const bazFoo = 3
|
const bazFoo = 3
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
|
||||||
|
You MUST avoid using `mocks` as much as possible.
|
||||||
|
Tests MUST test actual implementation, do not duplicate logic into a test.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user