Repository navigation
chore(remark-lint): migrate to @doc-kit/core - #9290
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9290 +/- ##
==========================================
+ Coverage 86.97% 87.00% +0.02%
==========================================
Files 88 88
Lines 6356 6377 +21
Branches 386 387 +1
==========================================
+ Hits 5528 5548 +20
- Misses 824 825 +1
Partials 4 4 ☔ View full report in Codecov by Harness. |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The rule incorrectly flags valid expressions such as {vm.Module[][]} and {typeof vm.Module} because it uses identifier-only resolution instead of the full annotation resolver.
1 open issue
1 file not reviewed
pnpm-lock.yaml: Generated file
What changed in this PR
Migrates @node-core/remark-lint to doc-kit’s extracted core package, replacing the incompatible dependency bump in #9286 and reducing generator-related dependencies.
Changes:
- Switches shared helper imports and dependencies to
@doc-kit/core. - Updates type-reference validation and underscore-preserving heading anchors.
- Adds regression tests and a patch changeset.
| File | Description |
|---|---|
pnpm-lock.yaml |
Locks the core dependency and removes unused transitive dependencies. |
packages/remark-lint/src/rules/validate-links.mjs |
Imports core’s heading slugger. |
packages/remark-lint/src/rules/invalid-type-reference.mjs |
Adds local type matching and identifier resolution. |
packages/remark-lint/src/rules/duplicate-stability-nodes.mjs |
Imports query helpers from core. |
packages/remark-lint/src/rules/__tests__/validate-links.test.mjs |
Expects underscores in heading anchors. |
packages/remark-lint/src/rules/__tests__/invalid-type-reference.test.mjs |
Covers HTML exclusions, arrays, qualified names, and unions. |
packages/remark-lint/package.json |
Replaces the doc-kit dependency with core. |
.changeset/quiet-rules-migrate.md |
Records the patch release and behavior changes. |
Review effort: Balanced
Contributor
📦 Build Size ComparisonSummary
|
AugustinMauroy
approved these changes
Nov 1, 2026
aymen94
approved these changes
Nov 2, 2026
avivkeller
approved these changes
Nov 2, 2026
avivkeller
reviewed
Nov 2, 2026
@node-core/doc-kit 2 moved its internals to @doc-kit/core, and removed
the two helpers invalid-type-reference was built on:
`transformTypeToReferenceLink` and `QUERIES.normalizeTypes`.
- duplicate-stability-nodes and validate-links import the same modules
from @doc-kit/core.
- invalid-type-reference keeps its type pattern locally and resolves
each `|` member with doc-kit's `resolveTypeReference`, so it accepts
exactly what the generator can link. Types never reach it with `<>`
in them, so the old generic handling is gone.
- The old resolver accepted anything containing a `.`, which hid HTML
comments and tags being read as `<type>` references. The html branch
now only matches bare `<name>` nodes.
- doc-kit 2 no longer turns `_` into `-` in slugs, matching the site's
rehype-slug and the Node.js API anchors (`#child_process`).
Over Node.js's doc/api with its type-map.json, the rule reports nothing
new: it drops the HTML false positives (7103 -> 283 messages) and now
resolves {object}, {QuotaExceededError}, {WorkerGlobalScope} and
{DedicatedWorkerGlobalScope}. The site's markdown lint stays clean.
Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
ovflowd
force-pushed
the
chore/remark-lint-doc-kit-2
branch
from
November 4, 2026 18:17
a5fcc2d to
b3b3287
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
This PR moves
@node-core/remark-lintfrom@node-core/doc-kit1.x to@doc-kit/core, which is where doc-kit 2 keeps the internals our lint rules import. Dependabot's bump to@node-core/doc-kit2.0.6 in #9286 fails, because two of the helpersinvalid-type-referenceused are gone.duplicate-stability-nodesandvalidate-linksimport the same modules (QUERIES, the slugger) from@doc-kit/core.invalid-type-referencekeeps its type pattern locally and checks each|member with doc-kit'sresolveTypeReference, so it accepts exactly what the generator can link. The old resolver accepted anything with a.in it, which hid HTML comments and tags being read as<type>references. The html branch now only matches bare<name>nodes._in slugs, sovalidate-linksnow expects#child_processfor achild_processheading. That's also what the site'srehype-slugand the Node.js API docs generate.The lockfile loses ~1,200 lines, since
@doc-kit/coredoesn't pull in React, Orama and the rest of doc-kit 1's generators. A patch changeset releases it.Validation
pnpm test, Prettier and the package'slint:jspass, and the site'slint:mdstays clean with the newvalidate-links.invalid-type-referenceover the 70 files in nodejs/node'sdoc/apiwith itstype-map.json. The new rule reports nothing the old one didn't: it drops the HTML comment and tag false positives (7,103 → 283 messages) and now resolves{object},{QuotaExceededError},{WorkerGlobalScope}and{DedicatedWorkerGlobalScope}.Related Issues
Supersedes #9286
Check List
pnpm formatto ensure the code follows the style guide.pnpm testto check if all tests are passing.pnpm buildto check if the website builds without errors.