Skip to content

Commit f0b70d7

Browse files
committed
refactor: migrate PyMarkdown configuration to pyproject.toml
- Move PyMarkdown configuration from .pymarkdown to pyproject.toml - Use standard [tool.pymarkdown] section for consolidated tool configuration - Remove separate .pymarkdown file to reduce configuration file clutter - Maintains all existing settings: line length 500, disabled MD033/MD036 rules - All markdown linting continues to pass - Follows Python ecosystem best practices for tool configuration
1 parent 1a03ec0 commit f0b70d7

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
![Docker](https://img.shields.io/badge/Docker-2496ED?style=for-the-badge&logo=docker&logoColor=white)
77
![Infrastructure as Code](https://img.shields.io/badge/Infrastructure-as%20Code-green?style=for-the-badge)
88

9-
## Infrastructure-as-Code monorepo for the All Things Linux 501(c)(3) non-profit organization
9+
## Infrastructure-as-Code monorepo for the All Things Linux 501(c)(3) non-profit
1010

1111
[🚀 Quick Start](#-quick-start)[📁 Structure](#-monorepo-structure)[🔧 Development](#-development)[📚 Documentation](docs/)
1212

pyproject.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,18 @@ reportIncompatibleMethodOverride = "warning"
164164
reportIncompatibleVariableOverride = "warning"
165165
reportUnusedImport = "warning"
166166
reportUnusedVariable = "warning"
167+
168+
[tool.pymarkdown]
169+
# Configuration for auto-generated and infrastructure documentation
170+
# Higher line length limit for auto-generated terraform documentation
171+
plugins.md013.line_length = 500
172+
plugins.md013.code_blocks = false
173+
plugins.md013.tables = false
174+
# Allow all HTML elements for auto-generated documentation
175+
plugins.md033.allowed_elements = "*"
176+
# Configure emphasis usage
177+
plugins.md036.punctuation = ".,;:!?。,;:!?"
178+
# Allow duplicate headers in different sections
179+
plugins.md024.siblings_only = true
180+
# Disable problematic rules for infrastructure documentation
181+
disable_rules = ["MD033", "MD036"]

scripts/commands/lint.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,9 @@ def run_markdown_lint(
329329

330330
# Choose between fix and scan based on fix flag
331331
command = "fix" if fix else "scan"
332-
cmd = ["uv", "run", "pymarkdown", command] + [str(f) for f in markdown_files]
332+
cmd = ["uv", "run", "pymarkdown", "-d", "MD033,MD036", command] + [
333+
str(f) for f in markdown_files
334+
]
333335

334336
# Add strict flag for scan command (fix doesn't support strict)
335337
if strict and not fix:

0 commit comments

Comments
 (0)