Skip to content

Lint and spellcheck documentation pages nested more than one level deep #2875

Description

@AlexSkrypnyk

Summary

The documentation lint and spellcheck scripts pass content/**/*.mdx unquoted, so the shell expands the glob before the tool ever sees it. Yarn runs scripts through sh, which has no globstar, so ** collapses to a single * and only pages one level below content/ are checked. Every page nested deeper is silently skipped by both markdownlint and cspell.

Details

.vortex/docs/package.json:

"spellcheck": "cspell content/*.mdx content/**/*.mdx",
"lint-docs": "markdownlint-cli2 content/**/*.mdx",
"lint-docs-fix": "markdownlint-cli2 content/**/*.mdx --fix"

Running ahoy --file .vortex/.ahoy.yml lint-docs reports Linting: 60 file(s) for markdownlint and Files checked: 68 for cspell. Neither list includes any of the five pages under content/contributing/maintenance/:

  • content/contributing/maintenance/README.mdx
  • content/contributing/maintenance/documentation.mdx
  • content/contributing/maintenance/installer.mdx
  • content/contributing/maintenance/release.mdx
  • content/contributing/maintenance/template.mdx

These pages are published to the documentation site, so style and spelling regressions in them reach production unchecked. The gap is silent rather than noisy: both commands exit 0 and report a plausible-looking file count, so nothing signals that a directory is being skipped.

Suggested resolution

Quote the globs so the tools expand them internally, since both cspell and markdownlint-cli2 support ** natively:

"spellcheck": "cspell \"content/**/*.mdx\"",
"lint-docs": "markdownlint-cli2 \"content/**/*.mdx\"",
"lint-docs-fix": "markdownlint-cli2 \"content/**/*.mdx\" --fix"

Worth verifying while making the change: confirm whether the quoted content/**/*.mdx still matches the top-level content/*.mdx pages under each tool's glob implementation, and keep the explicit top-level pattern if it does not. The reported file counts going up, and the five pages above appearing in the output, is the check that the fix worked.

Expect the first run after the fix to surface pre-existing findings in the previously unchecked pages.

Related

Found while editing content/contributing/maintenance/template.mdx in #2872, when that file appeared in neither tool's output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A1Board worker 1

    Type

    No type

    Projects

    Status
    Release queue

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions