Skip to content

Encode the callout scale and the doc card props in the Inki linter - #3469

Merged
pwizla merged 6 commits into
mainfrom
repo/inki-callout-lint-rules
Sep 11, 2026
Merged

Encode the callout scale and the doc card props in the Inki linter#3469
pwizla merged 6 commits into
mainfrom
repo/inki-callout-lint-rules

Conversation

@pwizla

@pwizla pwizla commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

This PR encodes 2 sets of component conventions in the Inki style linter, in the style checker prompt, and in the authoring guides.

Callouts:

  • danger-admonition (error) flags :::danger, which is not part of the scale (info, note, tip, prerequisites, caution, warning) and renders the same red block titled "Warning" as :::warning, so it adds no signal.
  • admonition-run (warning) flags 3 or more callouts in a row, whatever their types: a wall the reader stops reading.
  • same-type-admonitions (warning) flags 2 callouts of the same type back to back, which are one callout and belong in a single block with a bullet per point.
  • stacked-alerts (warning) flags 2 high-level callouts (caution, warning, danger) back to back, which flattens the hierarchy into a wall of red.

A pair of different low-level types, and the documented :::prerequisites plus :::caution page-header motif, are deliberately not flagged as long as the run stops at 2.

Doc cards:

  • unknown-card-prop (error) flags any prop <CustomDocCard> does not read. The component destructures exactly title, description, link, icon and small, so the emoji prop found on 62 of the 152 cards in the docs renders a card with no icon and reports nothing. <SubtleCallout> does take an emoji, so the rule is scoped to the card component rather than to the prop name.
  • templates/components/doc-cards.md documents the card components, which had no authoring guide despite being the most used custom component in the docs: the real props, the 2 wrappers, the single-line truncation of description, and the emoji trap.

Measured on the 343 pages under docusaurus/docs: 5 :::danger occurrences, 14 runs of 3 or more callouts, 8 same-type pairs, 1 stacked alert, and 62 dead emoji props. Scoping matters: a first version of the run check flagged any 2 consecutive callouts and fired 122 times, mostly on harmless note and tip pairs. Neither the plugin version nor the changelog is bumped, following #3466.

@pwizla pwizla self-assigned this Sep 11, 2026
@vercel

vercel Bot commented Sep 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
documentation Ready Ready Preview Sep 11, 2026 9:39am UTC

Request Review

@github-actions github-actions Bot added internal PRs created by the Strapi core team pr: chore source: repo PRs/issues not targeting a specific documentation but rather affecting the whole repo labels Sep 11, 2026
@pwizla pwizla changed the title Add callout scale checks to the Inki style linter and prompt Encode the callout scale and the doc card props in the Inki linter Sep 11, 2026
Comment thread claude-plugins/inki/references/templates/components/doc-cards.md Outdated
@pwizla

pwizla commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator Author

LGTM 🚀

@pwizla
pwizla merged commit 20afcc0 into main Sep 11, 2026
5 checks passed
@pwizla
pwizla deleted the repo/inki-callout-lint-rules branch September 11, 2026 10:12
@pwizla pwizla added this to the 7.2.0 milestone Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal PRs created by the Strapi core team pr: chore source: repo PRs/issues not targeting a specific documentation but rather affecting the whole repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant