Skip to content

Commit 9ebdaea

Browse files
authored
Update coding guidelines in AGENTS.md
Added guidelines for test cases, code coverage, and deprecation notes.
1 parent 6b157f1 commit 9ebdaea

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

AGENTS.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### General
66

7+
- Read `docs/CONTRIBUTING.md` for details on setting up the repository for development
78
- Unless stated otherwise, avoid Node.js
89
- Apply our latest coding style to every file changed
910
- Avoid spaghetti code: on new feature with a similar existing feature, refactor existing one before writing new feature
@@ -23,6 +24,9 @@
2324
- Prefer uppercase for acronyms instead of Pascal case, e.g. `getURL()` over `getUrl()`
2425
- The only exception is `id`, e.g. `getId()` over `getID()`
2526
- Use fewer shorthands, only allow `min`, `max`, `num`
27+
- All new/changed production code must have test cases, look at `__tests__/html2/**`
28+
- Code coverage for new/changed code should reach 80%
29+
- Deprecation notes should mark the date as 2 years from now
2630

2731
### Design
2832

@@ -48,7 +52,11 @@
4852
- Use `{ readonly value: string }` instead of `Readonly<{ value: string }>`
4953
- Use as much `readonly` as possible
5054

51-
### React template
55+
### React
56+
57+
- Always add `displayName`
58+
59+
Follow the template below.
5260

5361
```tsx
5462
import { reactNode, validateProps } from '@msinternal/botframework-webchat-react-valibot';

0 commit comments

Comments
 (0)