Repository navigation
docs: lint docs content with comark-linter - #546
Conversation
Bumps comark-docs to 0640755, which ships a comark-linter preset (lint.mjs): the components the layer renders, and links resolved through comark-content. docs/comark-lint.config.ts adds the site's own app/components/prose/ components and its /play and /stream Vue pages, and pnpm lint runs it, so CI checks the docs on every PR. Amp-Thread-ID: https://ampcode.com/threads/T-01a18c64-cf17-72b6-afc0-24d664666b30
The bumped layer renders with comark 0.8, whose heading ids are flat, so 112 links to nested or older code- ids are pointed at the flat id of the heading each meant. The 9 tab-item blocks become Nuxt UI's tabs-item, without the gap-0 that made up for the raw element's margin. Amp-Thread-ID: https://ampcode.com/threads/T-01a18c64-cf17-72b6-afc0-24d664666b30
|
Note The title starts with
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
8 Skipped Deployments
|
|
Caution Review failedThe pull request is closed.
|
| Layer / File(s) | Summary |
|---|---|
Docs linter setup docs/comark-lint.config.ts, docs/package.json, pnpm-workspace.yaml |
Adds a docs lint command and linter dependency. The configuration extends the docs preset with site component names and route matching. |
Documentation markup and links docs/content/1.getting-started/1.installation.md, docs/content/7.kb/4.twoslash.md, docs/content/9.ecosystem.md, docs/content/index.md, docs/content/10.use-cases/*.md, docs/content/11.compare/*.md, docs/content/3.rendering/*.md, docs/content/4.plugins/**/*.md, docs/content/5.reference/0.render.md |
Updates tab directives and component names. Updates internal links to current heading anchors. |
Root lint integration and instructions package.json, AGENTS.md |
Adds docs-site linting to the root lint command and documents the docs lint command, checks, and configuration. |
Estimated code review effort: 2 (Simple) | ~12 minutes
Change: Other
Possibly related issues
- comarkdown/comark#404 — The issue tracks the
comark-docsdigest update that this PR applies.
Possibly related PRs
- comarkdown/comark#521 — This PR continues the
comark-docsdependency update and adjusts content for the resulting heading IDs and component syntax.
Suggested reviewers: larbish
Merge Risk: 
Low · up to fd5fb
-
The /stream page loses the intended layout and styling for several landing sections; adding their loaders is a small fix before merging.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (3 skipped: 3 unsupported.)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
comark
@comark/angular
@comark/ansi
@comark/html
@comark/nuxt
@comark/react
@comark/svelte
@comark/vue
commit: |
Merging this PR will not alter performance1 warning
Comparing |
comarkdown/comark-docs#79 bumps the layer's content cache version, so a deployment still serving comark 0.7's nested heading ids can't warm the cache the new one reads. It also re-exports Nuxt UI's button instead of making UButton and UPageHero global, so the landing and ecosystem pages use ::landing-hero and :::button. Amp-Thread-ID: https://ampcode.com/threads/T-01a18c64-cf17-72b6-afc0-24d664666b30
/stream renders content/index.md through its own components manifest. ::u-page-hero worked there only because the layer made UPageHero global, and the layer's LandingHero isn't, so map it to Nuxt UI's PageHero. Amp-Thread-ID: https://ampcode.com/threads/T-01a18c64-cf17-72b6-afc0-24d664666b30
Written by an AI agent (Amp) on behalf of @atinux.
Lints
docs/contentwith comark-linter and fixes what it finds.pnpm lintnow runs it, so CI checks the docs on every PR.Linter
comark-docsfrom217ac74ato96c1546. That brings its lint preset (feat: ship a comark-linter config for sites comark-docs#76), which knows the components the layer renders and resolves links through comark-content the way the site serves them, and fix: bump the content cache version and re-export Nuxt UI's button instead of global u- components comark-docs#79, which bumps the layer's content cache version for comark 0.8 and drops its globalu-components.docs/comark-lint.config.tsextends it with the site's ownapp/components/prose/components (::ecosystem-*, the landing demos) and the/playand/streamVue pages.comark-linteris added to the catalog and runs ascomark-lint "content/**/*.md", throughpnpm --filter comark-docs-site lint.Fixes
#code-…ids), and the other 46 work there today only through nested ids. Each one now points at the flat id of the heading it meant. I derived that by parsing each target page withheadingIds: 'nested'and with flat ids, then pairing the headings. Renamed headings were mapped by hand:render-options-*became therenderHtml/renderAnsioptions, and#comarkpluginbecameComarkPlugin<TMeta, TFrontmatter>. With the bumped layer running innuxt dev, every changed link's fragment exists as anidin the rendered page (111 links on changed lines across 15 pages, 0 missing).u-blocks. The layer no longer makesUButtonandUPageHeroglobal, so the landing and ecosystem pages use::landing-heroand:::button, which the layer re-exports. The lint flagged all 7 after the bump. The landing hero looks the same, and the ecosystem page's buttons render.::tab-itemblocks in the installation and Twoslash pages become Nuxt UI'stabs-item.tab-itemonly rendered because the tabs read any child's label and icon, leaving 7 raw<tab-item>elements on the installation page. Thegap-0on those tabs made up for that element's margin, so it goes too. The tabs look the same in the dev server and switch frameworks.Note: the layer bump changes heading ids site-wide, so outside links to nested anchors on comark.dev stop matching after this deploys.
pnpm lintpasses. AGENTS.md mentions the docs lint.Summary by CodeRabbit