lint-mdx.js: multi-line opening tags (Card, CardGroup, etc.) silently skipped by attribute check
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- javascript
- Domain
- documentation, tooling
Research direction
Start in scripts/lint-mdx.js at checkMintlifyComponents and inspect how each line is matched against the opening-tag regex. Run the linter against the cited MDX files, then verify that multi-line Card tags are checked, including a synthetic Card missing title=, while existing valid tags produce no new findings.
Written by the indexing model from the issue text.
Description
Description
The opening-tag check in scripts/lint-mdx.js (checkMintlifyComponents) matches each line against a regex that expects the tag and its attributes on the same line. When a tag's name is on its own line, with attributes like title= spread across the following lines, the regex never matches - so the tag is silently skipped entirely. No required-attribute check runs, no CardGroup cols check runs, and it is not tracked for parent/child nesting rules.
Evidence
Found 5 multi-line opening tags across 2 files that were never being checked at all:
- docs/base-account/quickstart/ai-tools-available-for-devs.mdx - 3 multi-line Card tags (lines 10, 47, 67)
- docs/apps/resources/templates.mdx - 2 multi-line Card tags (lines 22, 28)
All 5 happen to already have a valid title= attribute, so this gap doesn't currently produce any wrong output in the lint report - but it means the linter would silently miss a genuinely missing title on any of these tags, or on any future multi-line tag written in this style.
Example (ai-tools-available-for-devs.mdx):
A Card tag opens on its own line, with title= and other attributes set on the following lines, closing several lines later. Because the check only reads the line containing <Card, it never sees the tag at all.
Fix
Companion PR makes the check accumulate lines starting at a lone opening-tag line until a closing > is found, then runs the existing regex against the accumulated text. Verified against all 5 real instances (no new findings, since they're all valid) and a synthetic multi-line Card missing title=, which is now correctly flagged.
- Dominant language
- JavaScript
- Stars
- 337
- Forks
- 798
- Avg merge
- 13h 7m
- Merged PRs (30d)
- 57
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from base/docs
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
Similar issues
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Automattic/safe-publish#594 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
dream-num/dsh-univer-office#104 ·
-
comp/dashboard invalid P3
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
NousResearch/hermes-agent#121143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
avniproject/avni-webapp#1811 ·
-
area/auroraboot area/webui bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100