Skip to content

Commit e95d150

Browse files
Copilotjbampton
andauthored
Update README to document prek-based contributor checks (#619)
* docs: add prek README guidance Co-authored-by: jbampton <418747+jbampton@users.noreply.github.com> * docs: clarify prek setup requirements Co-authored-by: jbampton <418747+jbampton@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jbampton <418747+jbampton@users.noreply.github.com>
1 parent c36dd6c commit e95d150

1 file changed

Lines changed: 30 additions & 10 deletions

File tree

‎README.md‎

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,8 @@ Want to contribute to the project code or test your profile locally? Here's how
263263

264264
- **Node.js**: Version 20.x or higher ([Download](https://nodejs.org/))
265265
- **npm**: Comes with Node.js
266+
- **Python**: Version 3.13 or higher for the repository's `uv sync`-managed dev tools
267+
- **uv**: Recommended for installing Python dev tools
266268
- **Git**: For version control
267269

268270
### Installation
@@ -291,6 +293,24 @@ npm start
291293
npm run build
292294
```
293295

296+
### Quality Checks with prek
297+
298+
This repository uses [prek](https://github.com/j178/prek) to run its local quality checks and Git hooks from `.pre-commit-config.yaml`.
299+
300+
```bash
301+
# Install Python dev tools, including prek
302+
uv sync --only-group dev
303+
304+
# Install Git hooks in your clone
305+
uv run prek install
306+
307+
# Run the standard hooks across the repository
308+
uv run prek run --all-files
309+
310+
# Run the manual hooks when needed
311+
uv run prek run --all-files --hook-stage manual
312+
```
313+
294314
### Project Structure
295315

296316
```text
@@ -304,9 +324,9 @@ NextCommunity.github.io/
304324
│ │ └── zizmor.yml # GitHub Actions security lint config
305325
│ ├── workflows/
306326
│ │ ├── deploy.yml # Deployment workflow
307-
│ │ ├── prek-audit.yml # Pre-commit audit workflow
308-
│ │ ├── prek-manual.yml # Manual pre-commit workflow
309-
│ │ ├── prek.yml # Pre-commit workflow
327+
│ │ ├── prek-audit.yml # prek audit workflow
328+
│ │ ├── prek-manual.yml # Manual prek workflow
329+
│ │ ├── prek.yml # Standard prek workflow
310330
│ │ └── super-linter.yml # Super-linter workflow
311331
│ ├── CODEOWNERS # Code ownership rules
312332
│ ├── dependabot.yml # Dependabot configuration
@@ -357,8 +377,8 @@ NextCommunity.github.io/
357377
├── .gitattributes # Git text normalization rules
358378
├── .gitignore # Git ignored files
359379
├── .npmrc # npm configuration
360-
├── .pre-commit-config-audit.yaml # Pre-commit audit config
361-
├── .pre-commit-config.yaml # Pre-commit hooks config
380+
├── .pre-commit-config-audit.yaml # prek audit config
381+
├── .pre-commit-config.yaml # prek hooks config
362382
├── LICENSE # Project license
363383
├── biome.json # Biome formatter / linter config
364384
├── package-lock.json # Locked npm dependency versions
@@ -404,7 +424,7 @@ Every pull request runs automated checks:
404424

405425
- **Linting**: Ensures YAML syntax is correct
406426
- **Build Test**: Verifies the site builds successfully
407-
- **Pre-commit Hooks**: Checks code quality
427+
- **prek Hooks**: Checks code quality
408428

409429
If checks fail, you'll see error messages in the PR. Fix the issues and push again.
410430

@@ -445,18 +465,18 @@ If checks fail, you'll see error messages in the PR. Fix the issues and push aga
445465
- File must be named `username.yaml` (lowercase, with `.yaml` extension)
446466
- All required fields must be filled in
447467

448-
#### ❌ Pre-commit hooks fail
468+
#### ❌ prek hooks fail
449469

450470
**Problem**: Code quality checks didn't pass.
451471

452472
**Solution**:
453473

454474
```bash
455-
# Install pre-commit
456-
pip install pre-commit
475+
# Install prek
476+
uv sync --only-group dev
457477
458478
# Run checks manually
459-
pre-commit run --all-files
479+
uv run prek run --all-files
460480
```
461481

462482
### FAQ

0 commit comments

Comments
 (0)