Skip to content

Commit 07f4d41

Browse files
committed
feat: add TypeScript implementation guidelines and Copilot setup workflow
1 parent b94658c commit 07f4d41

File tree

3 files changed

+46
-7
lines changed

3 files changed

+46
-7
lines changed

.github/copilot-instructions.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,8 @@ Please use `pnpm` as your package manager. However, try to avoid introducing unn
88

99
## Implementation
1010

11-
Write code in `TypeScript` and avoid using the `any` type as much as possible. Maintain code formatting according to `Biome` rules.
12-
13-
Avoid code comments. Instead, consider using descriptive variable names to make it clear what the code is doing on its own.
14-
15-
Delete any code or files that become unnecessary as a result of your implementation.
11+
Write code in `TypeScript`. Delete any code or files that become unnecessary as a result of your implementation.
1612

1713
## Testing
1814

1915
Follow the TDD principles as Kent Beck writes: Red-Green-Refactor is the way to go. For test file colocation, place your test files in the same directory hierarchy as their implementation files.
20-
21-
Use `Vitest` as a testing framework.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "Copilot Setup Steps"
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
paths:
7+
- .github/workflows/copilot-setup-steps.yml
8+
pull_request:
9+
paths:
10+
- .github/workflows/copilot-setup-steps.yml
11+
12+
jobs:
13+
copilot-setup-steps:
14+
runs-on: ubuntu-24.04
15+
16+
permissions:
17+
contents: read
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Check this conf is respected
24+
run: |
25+
if [ ! -f .github/workflows/copilot-setup-steps.yml ]; then
26+
echo "Copilot setup steps file not found."
27+
exit 1
28+
fi
29+
echo "Copilot setup steps file exists."
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
applyTo: "**/*.ts,**/*.tsx"
3+
---
4+
5+
## Implementation
6+
7+
- Follow functional programming principles where possible
8+
- Use interfaces for data structures and type definitions
9+
- Prefer immutable data (`const`, `readonly`)
10+
- Use optional chaining (`?.`) and nullish coalescing (`??`) operators
11+
- Avoid `any` type as much as possible
12+
- Avoid code comments in favor of descriptive variable names
13+
14+
## Testing
15+
16+
Use `Vitest` as a testing framework.

0 commit comments

Comments
 (0)