Skip to content

Align with @wordpress/scripts #12

@carstingaxion

Description

@carstingaxion

The generated docs do look great to a human and can do their job very well, but the linter is greedy and was able to spot some minor problems.

When running wp-scripts lint-md-docs from @wordpress/scripts package, I got a bunch of errors, as you can see in the workflow run: https://github.com/GatherPress/gatherpress/actions/runs/16556801977/job/46819382625?pr=1135 (of PR#1135)

> wp-scripts lint-md-docs

docs/.../gatherpress_autoloader.md:2 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "Filters the registered autoloa..."]
docs/.../gatherpress_autoloader.md:30 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- [includes/core/classes/class..."]
docs/.../gatherpress_autoloader.md:31 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```php"]
docs/.../gatherpress_date_format.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## Auto-generated Example"]
docs/.../gatherpress_date_format.md:19 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- [includes/core/classes/class..."]
docs/.../gatherpress_date_format.md:20 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```php"]
docs/.../gatherpress_force_online_event_link.md:2 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "Filters whether to force the d..."]
docs/.../gatherpress_force_online_event_link.md:30 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- [includes/core/classes/class..."]
docs/.../gatherpress_force_online_event_link.md:31 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```php"]
docs/.../gatherpress_import.md:2 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "Fires for every GatherPress da..."]
docs/.../gatherpress_import.md:21 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- [includes/core/classes/class..."]
docs/.../gatherpress_import.md:22 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```php"]
docs/.../gatherpress_pseudopostmetas.md:2 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "Filters the list of data-names..."]
docs/.../gatherpress_pseudopostmetas.md:11:1 MD034/no-bare-urls Bare URL used [Context: "https://github.com/carstingaxi..."]
docs/.../gatherpress_pseudopostmetas.md:13 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "## Example"]
docs/.../gatherpress_pseudopostmetas.md:49 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- [includes/core/classes/class..."]
docs/.../gatherpress_pseudopostmetas.md:50 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```php"]
docs/.../gatherpress_roles.md:2 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "Filter the list of roles for G..."]
docs/.../gatherpress_roles.md:32 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- [includes/core/classes/setti..."]
docs/.../gatherpress_roles.md:33 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```php"]
docs/.../gatherpress_settings_section.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## Auto-generated Example"]
docs/.../gatherpress_settings_section.md:18 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- [includes/templates/admin/se..."]
docs/.../gatherpress_settings_section.md:19 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```php"]
docs/.../gatherpress_sub_pages.md:2 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "Filters the list of GatherPres..."]
docs/.../gatherpress_sub_pages.md:29 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- [includes/core/classes/class..."]
docs/.../gatherpress_sub_pages.md:30 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```php"]
docs/.../gatherpress_text_after.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## Auto-generated Example"]
docs/.../gatherpress_text_after.md:24 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- [includes/templates/admin/se..."]
docs/.../gatherpress_text_after.md:25 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```php"]
docs/.../gatherpress_time_format.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## Auto-generated Example"]
docs/.../gatherpress_time_format.md:19 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- [includes/core/classes/class..."]
docs/.../gatherpress_time_format.md:20 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```php"]
docs/.../gatherpress_timezone.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## Auto-generated Example"]
docs/.../gatherpress_timezone.md:19 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- [includes/core/classes/class..."]
docs/.../gatherpress_timezone.md:20 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```php"]
docs/.../Hooks.md:2 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## class-autoloader.php"]
Error: Process completed with exit code 1.

it looks a lot, but essentially it's only:

  • MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading
  • MD032/blanks-around-lists Lists should be surrounded by blank lines
  • MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines

while MD034 and MD024 seem to be todos on my list ;)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions