Repository navigation
docs: update heading levels - #15631
Merged
Merged
Conversation
Promote the `plugin()` and `plugin.factory( [options] )` signature headings inside the README usage section from level 3 to level 4. Level 4 is used at this position by 12 of 14 packages (86%) in `_tools/remark/plugins`, and by 6194 of 6200 stdlib package READMEs (99.90%) that carry an API heading inside their usage section. `remark-lint-eslint` exposes an identical `plugin()` plus `plugin.factory( [options] )` API and already documents both at level 4, so the deviation does not track a difference in API shape. The corrected condition is a primary signature heading at level 3 with no level-4 heading above it. Level-3 headings remain correct elsewhere as sub-grouping headings beneath a level-4 API heading. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019GHyxM56Nqjq3iY7UZ4Tdq
Promote the `sectionStructure()` signature heading inside the README usage section from level 3 to level 4. Level 4 is used at this position by 12 of 14 packages (86%) in `_tools/remark/plugins`, and by 6194 of 6200 stdlib package READMEs (99.90%) that carry an API heading inside their usage section. Sibling single-function plugins document their exported function the same way: `remark-lint-equations` uses `#### lint()` and `remark-namespace-toc` uses `#### insertTOC()`. This package exports a single plugin function of exactly that kind, and its usage section has no sub-headings, so nothing nests beneath the changed heading. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019GHyxM56Nqjq3iY7UZ4Tdq
kgryte
marked this pull request as ready for review
September 28, 2026 21:53
kgryte
approved these changes
Sep 28, 2026
_tools/remark/plugins READMEs
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 pull request promotes three README API signature headings from level 3 to level 4, so that the primary signature heading inside
<section class="usage">sits at level 4 as it does in 6194 of 6200 (99.90%) stdlib package READMEs carrying an API heading in their usage section, and in 12 of 14 (86%) packages in_tools/remark/plugins.The corrected condition is specific: a primary signature heading at level 3 with no level-4 heading above it. Level-3 headings remain correct elsewhere in stdlib as sub-grouping headings (
### Properties,### Methods) nested beneath a level-4 API heading — 199 READMEs use them that way, and this change is not a licence to demote those.@stdlib/_tools/remark/plugins/remark-lint-expected-html-sectionsDemotes the
plugin()andplugin.factory( [options] )API signature headings in the<section class="usage">block from level 3 to level 4 (lines 41 and 57).remark-lint-eslintexposes an identicalplugin()andplugin.factory( [options] )API — samemain.js+factory.js+setReadOnlyshape — and already documents both at level 4, so the deviation does not track a difference in API shape. Documentation-only; no behavior, signature, or test expectation changes.@stdlib/_tools/remark/plugins/remark-lint-html-section-structureUpdates the
sectionStructure()API signature heading in the<section class="usage">block from level 3 to level 4 (line 45). Sibling single-function plugins document their exported function the same way:remark-lint-equationsuses#### lint()andremark-namespace-tocuses#### insertTOC(). The usage section has no sub-headings, so nothing nests beneath the changed heading. Documentation-only; no behavior, signature, or test expectation changes.Related Issues
None.
Questions
Two, both about scope rather than the change itself:
_tools/remark/plugins/remark-img-figures#13895 and feat: add_tools/remark/plugins/remark-img-figures-src-urls#13907, add new packages to this namespace. Neither modifies an existing member, so neither collides with this change — but the drift routine's collision gate is written to trip on any open PR naming the same namespace. This run treated the gate as being about file-level collision and proceeded. Flagging it in case you would rather such runs stand down whenever the namespace is otherwise active.array/basepackages (without,take-map,to-inserted-at,with) carry level-3 signature headings for their.assignvariants and are the only remaining instances of this pattern repo-wide. They are outside this run's namespace and so outside this PR. Happy to follow up with a separatearray/basePR if you want them swept.Other
Scope. Three lines across two files; hash count only. Bracket escaping was left verbatim (
\[options]matchesremark-lint-eslint; the namespace is split 1–1 on\[options]vs\[options\], so there is no majority to normalize toward). The<!-- /.usge -->string atremark-lint-html-section-structure/README.md:82is untouched — it is a deliberate lint-violation demo inside a fenced example.Lint safety.
remark-lint-heading-incrementis set to'off'inetc/remark/plugins/lint/index.js:297-300, so the resulting##→####jump cannot be flagged; this is why 6202 packages already do it.first-heading-level,heading-style,maximum-heading-lengthandno-duplicate-headings-in-sectionwere each checked against the new state and none is violated. This was verified by reading the remark configuration rather than by executing remark, which is not installed in the working environment.Deliberately excluded.
<section class="related">block to both packages (12/14 = 86% majority). The section is generator-owned — it carriesDo not manually edit this section, as it is automatically populated.— and this namespace's own linter schema (remark-lint-expected-html-sections/lib/defaults.json) listsrelatedas optional, not required, so its absence violates nothing.# ESLint,# Lint Equations; 86% majority). A conforming title has to be invented per package, so the fix is not mechanical and the majority pattern does not determine the replacement text. Real drift, left for a maintainer.format: nothing to do. All 20throw newsites across all 14 members already use@stdlib/string/format.lib/attacher.js57% vslib/main.js43%),test/directory presence (28%),## Notesheading (43%),mdastandhtmlkeywords (64% each).Correction to an intermediate figure. An earlier pass of this analysis reported 99.95% conformance with only three exceptions repo-wide. That undercounted: the scan classified a README as conforming whenever any
####was present, which hid four mixed-levelarray/basefiles. The 99.90% / six-exception figures above come from a corrected scan that distinguishes signature headings from grouping headings.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This pull request was authored by Claude Code on behalf of @Planeshifter as an automated cross-package API-drift detection run against the
@stdlib/_tools/remark/pluginsnamespace. Structural and semantic features were extracted from all 14 members, a per-feature majority pattern was computed at a 75% threshold, and candidate corrections were filtered through pre-validation gates and a three-agent validation pass (semantic review, cross-reference for test/consumer dependencies, structural review). Every correction that survived is documented above; everything dropped is listed with its reason. This PR is opened as a draft for a human to audit and promote.@stdlib-js/reviewers
🤖 Generated with Claude Code
https://claude.ai/code/session_019GHyxM56Nqjq3iY7UZ4Tdq
Generated by Claude Code