Encode the callout scale and the doc card props in the Inki linter - #3469
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
pwizla
commented
Sep 11, 2026
Collaborator
Author
|
LGTM 🚀 |
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.
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
:::prerequisitesplus:::cautionpage-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 exactlytitle,description,link,iconandsmall, so theemojiprop found on 62 of the 152 cards in the docs renders a card with no icon and reports nothing.<SubtleCallout>does take anemoji, so the rule is scoped to the card component rather than to the prop name.templates/components/doc-cards.mddocuments 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 ofdescription, and theemojitrap.Measured on the 343 pages under
docusaurus/docs: 5:::dangeroccurrences, 14 runs of 3 or more callouts, 8 same-type pairs, 1 stacked alert, and 62 deademojiprops. 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.