Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

lint-mdx.js: multi-line opening tags (Card, CardGroup, etc.) silently skipped by attribute check

オープン
#1,795 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
javascript

調査の方向性

scripts/lint-mdx.js の checkMintlifyComponents から開始し、各行が開きタグ用の正規表現に対してどのように照合されるかを確認します。引用されている MDX ファイルに対して linter を実行し、その後、複数行にわたる Card タグが検査されることを、title= がない合成 Card タグも含めて確認します。同時に、既存の有効なタグから新しい検出結果が発生しないことも確認します。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
JavaScript
スター
337
フォーク
798
平均マージ
13時間 7分
マージ済み PR(30日)
57

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

base/docs のほかの issue

base/docs の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。