Repository navigation
Code Style
Youssef Youssef edited this page Oct 19, 2026
·
1 revision
PULSE enforces one code style automatically, so reviews focus on logic rather than formatting. Linters catch mistakes, formatters fix layout, and pre-commit hooks run both on every commit.
| Area | Style guide |
|---|---|
| Python (backend, Discord bot, scripts) | PEP 8, enforced by Ruff |
| TypeScript / React (frontend) | ESLint recommended rules (@eslint/js, typescript-eslint, React Hooks) and Prettier's default style |
| All files |
.editorconfig: UTF-8, LF line endings, final newline, 2-space indent (4 for Python), 100-character lines |
| Area | Linter | Formatter | Config files |
|---|---|---|---|
| Backend | Ruff | Ruff | backend/pyproject.toml |
| Discord bot | Ruff | Ruff | discord-bots/team-bot/pyproject.toml |
Other Python (scripts/) |
Ruff | Ruff | ruff.toml |
| Frontend | ESLint | Prettier |
frontend/eslint.config.js, frontend/.prettierrc.json
|
| Pre-commit hooks | .pre-commit-config.yaml |
||
| Editor settings |
.editorconfig, .vscode/extensions.json
|
Main rules
- Lines are at most 100 characters (Python and frontend).
- Ruff rule groups:
E,W(PEP 8 style),F(real errors such as undefined names),I(sorted imports),B(common bugs),UP(modern Python syntax),SIM(simpler code),RUF(Ruff's own checks). - ESLint fails on any warning (
--max-warnings=0). - ESLint handles code quality; Prettier handles formatting.
eslint-config-prettierturns off ESLint's formatting rules so the two never conflict. -
.gitattributesstores every file with LF line endings, so the checks behave the same on Windows, macOS and Linux.
pip install pre-commit uv
pre-commit install
cd backend && uv sync
cd ../frontend && npm ciPULSE Wiki
- Home
- Team Structure
- Product Roadmap
- Meeting Minutes
- Risks
- User Consent and EULA
- Legal and Ethical Issues
- Economic
- Budget
- Personas
- Diversity Statement
- Overall Architecture and Class Diagrams
- Architecture Decision Records
- Infrastructure and Tools
- Naming Conventions
- Code Style
- Testing Plan and Continuous Integration
- Security
- Performance
- Deployment Plan and Infrastructure
- Missing Knowledge and Independent Learning
-
Iteration and Release Notes
- Iteration 1 (Oct 6, 2026)
- Iteration 2 (Oct 20, 2026)
- Iteration 3 (Nov 3, 2026)
- Iteration 4 (Nov 17, 2026)
- Iteration 5 (Dec 1, 2026)
- Iteration 6 (Dec 15, 2026)
- Iteration 7 (Jan 19, 2027)
- Iteration 8 (Feb 5, 2027)
- Iteration 9 (Feb 16, 2027)
- Iteration 10 (Mar 2, 2027)
- Iteration 11 (Mar 16, 2027)
- Iteration 12 (Mar 30, 2027)
- Iteration 13 (Apr 13, 2027)