Skip to content

Commit 05bd359

Browse files
docs: fix all markdownlint errors and add lint:docs task
CONTRIBUTING.md: - Use 1. for all ordered list items (MD029 style=one) - Add blank lines around every fenced code block inside list items (MD031) - Add language specifier to bare fences: text for commit examples (MD040) - Fix table pipe spacing to use compact style with spaces (MD060) README.md: - Use 1. for all ordered list items in token setup section (MD029) .pre-commit-config.yaml: - Add --ignore CHANGELOG.md to the markdownlint hook so commitizen- generated changelogs are not linted (their format is not configurable) pyproject.toml: - Add poe lint:docs task running markdownlint on all .md files excluding CHANGELOG.md
1 parent 82da6c3 commit 05bd359

4 files changed

Lines changed: 22 additions & 13 deletions

File tree

.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ repos:
1212
args:
1313
- --config
1414
- .markdownlint.yml
15+
- --ignore
16+
- CHANGELOG.md
1517

1618
- repo: https://github.com/astral-sh/ruff-pre-commit
1719
rev: v0.15.6

CONTRIBUTING.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,25 @@ This document explains how to contribute to the edit-python.pe project, the comm
55
## 🤝 How to Contribute
66

77
1. Make sure to find an open issue on [GitHub](https://github.com/pythonpe/edit-python.pe/issues).
8-
2. Fork the [edit-python.pe](https://github.com/pythonpe/edit-python.pe) repository.
9-
3. Clone the forked repository to your local machine.
10-
4. Install [`uv`](https://docs.astral.sh/uv/getting-started/installation/).
11-
5. Install dependencies:
8+
1. Fork the [edit-python.pe](https://github.com/pythonpe/edit-python.pe) repository.
9+
1. Clone the forked repository to your local machine.
10+
1. Install [`uv`](https://docs.astral.sh/uv/getting-started/installation/).
11+
1. Install dependencies:
12+
1213
```bash
1314
uv sync
1415
```
15-
6. Install the pre-commit hooks (enforces conventional commits and quality checks):
16+
17+
1. Install the pre-commit hooks (enforces conventional commits and quality checks):
18+
1619
```bash
1720
uv run pre-commit install --hook-type commit-msg
1821
uv run pre-commit install
1922
```
20-
7. Make your changes and cover them with tests.
21-
8. Push your changes to the forked repository.
22-
9. Open a pull request on [GitHub](https://github.com/pythonpe/edit-python.pe/pulls).
23+
24+
1. Make your changes and cover them with tests.
25+
1. Push your changes to the forked repository.
26+
1. Open a pull request on [GitHub](https://github.com/pythonpe/edit-python.pe/pulls).
2327

2428
## 🚀 Development Commands
2529

@@ -28,20 +32,21 @@ We use `poethepoet` (poe) as our task runner. Run the following commands as need
2832
- `uv run poe lint`: Runs the `ruff` linter (and checks types using `ty`).
2933
- `uv run poe lint:format`: Formats the code using `ruff format`.
3034
- `uv run poe lint:types`: Checks types using `ty check`.
35+
- `uv run poe lint:docs`: Lints Markdown files using `markdownlint` (excludes `CHANGELOG.md`).
3136
- `uv run poe test`: Runs the test coverage with `pytest`.
3237

3338
## 📝 Commit Style (Conventional Commits)
3439

3540
This project enforces [Conventional Commits](https://www.conventionalcommits.org/) via a pre-commit hook powered by [Commitizen](https://commitizen-tools.github.io/commitizen/). Every commit message **must** follow this format:
3641

37-
```
42+
```text
3843
<type>(<optional scope>): <short description>
3944
```
4045

4146
Allowed types:
4247

4348
| Type | When to use |
44-
|------|-------------|
49+
| ------- | ------------------------------------------------------------ |
4550
| `feat` | A new feature |
4651
| `fix` | A bug fix |
4752
| `docs` | Documentation only changes |
@@ -54,7 +59,8 @@ Allowed types:
5459
| `chore` | Other changes that don't modify source or test files |
5560

5661
**Examples:**
57-
```
62+
63+
```text
5864
feat(auth): add GitHub OAuth login
5965
fix(markdown): handle missing homepage field gracefully
6066
docs: update README with uvx usage

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ Next, you'll be prompted for your access token and then you can seamlessly edit
2828
To interact with the repository and submit your profile, you will need a GitHub Personal Access Token.
2929

3030
1. Generate a [Personal access token (classic)](https://github.com/settings/tokens).
31-
2. **Required Scopes**: Grant the `user` and `repo` scopes.
32-
3. Copy the token and keep it handy.
31+
1. **Required Scopes**: Grant the `user` and `repo` scopes.
32+
1. Copy the token and keep it handy.
3333

3434
## 🤝 Contribute
3535

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ build-backend = "uv_build"
7777
"lint" = "uv run ruff check --fix"
7878
"lint:format" = "uv run ruff format"
7979
"lint:types" = "uv run ty check"
80+
"lint:docs" = { shell = "markdownlint '**/*.md' --ignore CHANGELOG.md --config .markdownlint.yml" }
8081
"test" = "uv run pytest --cov edit_python_pe --cov-report xml:cobertura.xml --cov-report term --junitxml report.xml"
8182
"freeze" = "uv export --format requirements.txt --no-group dev --no-hashes --no-annotate --no-header --output-file requirements.txt"
8283
"freeze:dev" = "uv export --format requirements.txt --all-groups --no-hashes --no-annotate --no-header --output-file requirements.dev.txt"

0 commit comments

Comments
 (0)