help-beta: Add MDX formatting to the linter.

This commit is contained in:
Shubham Padia
2025-08-06 10:47:04 +00:00
committed by Tim Abbott
parent 3e60b16ac1
commit 33f602fa98
2 changed files with 16 additions and 0 deletions

9
tools/format-mdx Executable file
View File

@@ -0,0 +1,9 @@
#!/usr/bin/env python3
import subprocess
subprocess.check_call(
["/usr/local/bin/corepack", "pnpm", "run", "format"],
cwd="starlight_help",
stdout=subprocess.DEVNULL,
)

View File

@@ -64,6 +64,7 @@ def run() -> None:
"hbs",
"html",
"js",
"mdx",
"mjs",
"mts",
"svg",
@@ -219,6 +220,12 @@ def run() -> None:
["tools/check-thirdparty"],
description="Check docs/THIRDPARTY copyright file syntax",
)
linter_config.external_linter(
"format-mdx",
["tools/format-mdx"],
["mdx"],
description="Lint and format MDX files",
)
@linter_config.lint
def custom_py() -> int: