docs: add format step to contributing workflow (#1552)

Co-authored-by: greatmengqi <chenmengqi.0376@bytedance.com>
This commit is contained in:
greatmengqi 2026-03-29 18:39:10 +08:00 committed by GitHub
parent 118485a7cb
commit 70e9f2dd2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -250,15 +250,26 @@ Nginx (port 2026) ← Unified entry point
2. **Make your changes** with hot-reload enabled 2. **Make your changes** with hot-reload enabled
3. **Test your changes** thoroughly 3. **Format and lint your code** (CI will reject unformatted code):
```bash
# Backend
cd backend
make format # ruff check --fix + ruff format
4. **Commit your changes**: # Frontend
cd frontend
pnpm format:write # Prettier
```
4. **Test your changes** thoroughly
5. **Commit your changes**:
```bash ```bash
git add . git add .
git commit -m "feat: description of your changes" git commit -m "feat: description of your changes"
``` ```
5. **Push and create a Pull Request**: 6. **Push and create a Pull Request**:
```bash ```bash
git push origin feature/your-feature-name git push origin feature/your-feature-name
``` ```
@ -284,8 +295,9 @@ Every pull request runs the backend regression workflow at [.github/workflows/ba
## Code Style ## Code Style
- **Backend (Python)**: We use `ruff` for linting and formatting - **Backend (Python)**: We use `ruff` for linting and formatting. Run `make format` before committing.
- **Frontend (TypeScript)**: We use ESLint and Prettier - **Frontend (TypeScript)**: We use ESLint and Prettier. Run `pnpm format:write` before committing.
- CI enforces formatting — PRs with unformatted code will fail the lint check.
## Documentation ## Documentation