Skip to content

Commit 56a76f0

Browse files
garland3claude
andcommitted
docs: add pre-commit linting requirements to validation workflow
Added explicit linting commands that should be run before every commit: - Python: ruff check backend/ || (uv pip install ruff && ruff check backend/) - Frontend: cd frontend && npm run lint Updated both the Linting section and Validation Workflow to emphasize running linting before committing to catch style issues early. Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 3d2307b commit 56a76f0

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

CLAUDE.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,17 +106,17 @@ npm run test:ui # Interactive UI
106106

107107
### Linting
108108

109+
**IMPORTANT: Run linting before every commit to catch style issues early.**
110+
109111
**Python:**
110112
```bash
111-
source .venv/bin/activate
112-
uv pip install ruff
113-
ruff check backend/ # ~1 second
113+
# This command auto-installs ruff if not present, then runs the check
114+
ruff check backend/ || (uv pip install ruff && ruff check backend/)
114115
```
115116

116117
**Frontend:**
117118
```bash
118-
cd frontend
119-
npm run lint # ~1 second
119+
cd frontend && npm run lint
120120
```
121121

122122
### Docker
@@ -271,9 +271,11 @@ Request → SecurityHeaders → RateLimit → Auth → Route
271271
## Validation Workflow
272272

273273
Before committing:
274-
1. **Build**: Frontend and backend build successfully
274+
1. **Lint**: Address style issues before running tests
275+
- Python: `ruff check backend/ || (uv pip install ruff && ruff check backend/)`
276+
- Frontend: `cd frontend && npm run lint`
275277
2. **Test**: `./test/run_tests.sh all`
276-
3. **Lint**: Both Python (`ruff check backend/`) and frontend (`npm run lint`)
278+
3. **Build**: Frontend and backend build successfully
277279
4. **Manual**: Test in browser at http://localhost:8000
278280
5. **Exercise**: Test specific modified functionality
279281

0 commit comments

Comments
 (0)