Skip to content

Commit 28a926d

Browse files
ambvclaudeCopilot
authored
Add ESLint with CI enforcement (#10)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 663a0da commit 28a926d

File tree

28 files changed

+4701
-893
lines changed

28 files changed

+4701
-893
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,20 @@ jobs:
4040
echo "::error::Please run pip-compile to regenerate lockfiles. See README for instructions."
4141
exit 1
4242
fi
43+
44+
frontend-lint:
45+
name: Frontend Lint & Typecheck
46+
runs-on: ubuntu-latest
47+
defaults:
48+
run:
49+
working-directory: frontend
50+
steps:
51+
- uses: actions/checkout@v4
52+
- uses: actions/setup-node@v4
53+
with:
54+
node-version: 20
55+
cache: npm
56+
cache-dependency-path: frontend/package-lock.json
57+
- run: npm ci
58+
- run: npm run lint
59+
- run: npm run typecheck

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,17 @@ Services start automatically with hot reload:
3636

3737
### Testing
3838
```bash
39-
npm run lint # Frontend linting (in frontend directory)
39+
# Via Docker (recommended)
40+
docker compose -f docker-compose.dev.yml exec frontend npm run lint
41+
docker compose -f docker-compose.dev.yml exec frontend npm run typecheck
42+
43+
# Or locally in the frontend directory
44+
npm run lint # ESLint (must pass with zero errors)
4045
npm run typecheck # TypeScript type checking
4146
```
4247

48+
Both checks run in CI on pushes to `main` and on pull requests.
49+
4350
### Populating Mock Data
4451
```bash
4552
docker compose -f docker-compose.dev.yml exec backend python scripts/populate_db.py

docker-README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,16 @@ ADMIN_GITHUB_TEAMS=memory-python-org
152152

153153
**Note:** Development compose file uses port 9002 for frontend, production uses 3000.
154154

155+
### Linting & Type Checking
156+
157+
```bash
158+
# ESLint (must pass with zero errors)
159+
docker compose -f docker-compose.dev.yml exec frontend npm run lint
160+
161+
# TypeScript type checking
162+
docker compose -f docker-compose.dev.yml exec frontend npm run typecheck
163+
```
164+
155165
### Accessing the Database
156166

157167
```bash

0 commit comments

Comments
 (0)