You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: expand coding, testing, and PR guidelines in AGENTS.md
Updates `AGENTS.md` with additional guidance for AI agents:
- Adds a `Coding Practices` section covering imports (including `import type`) and preferring ECMAScript private fields (`#field`).
- Documents how to run unit tests without sharding and retries using `--config=no-sharding`.
- Clarifies that fixup commits should only be used for changes belonging to the target commit, while unrelated changes must use a separate commit.
Copy file name to clipboardExpand all lines: AGENTS.md
+16-5Lines changed: 16 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,15 @@ This is the source code for the Angular CLI and related build tooling. This guid
22
22
pnpm build --local
23
23
```
24
24
25
+
## Coding Practices
26
+
27
+
-**Imports:**
28
+
- Always use the `node:` protocol for Node.js built-in imports (e.g., `node:fs`, `node:path`, `node:assert`).
29
+
- Prefer named imports (e.g., `import { mkdtemp } from 'node:fs'`) or default imports (`import fs from 'node:fs'`) instead of namespace imports (`import * as fs`).
30
+
- Use type-only imports (`import type { ... }`) when importing types to avoid runtime side-effects.
31
+
-**Classes:**
32
+
- Prefer ECMAScript private fields (`#field`) over TypeScript `private` keywords for encapsulated state.
33
+
25
34
## Testing
26
35
27
36
-**Temporary Directories (`TEST_TMPDIR`):**
@@ -42,14 +51,15 @@ This is the source code for the Angular CLI and related build tooling. This guid
0 commit comments