Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#1,795 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Tranquilo
Stack tecnológico
javascript

Línea de trabajo

Comienza en scripts/lint-mdx.js, en checkMintlifyComponents, e inspecciona cómo se compara cada línea con la expresión regular de etiquetas de apertura. Ejecuta el linter contra los archivos MDX mencionados y, después, verifica que se comprueben las etiquetas Card de varias líneas, incluida una etiqueta Card sintética a la que le falte title=, mientras que las etiquetas válidas existentes no produzcan nuevos hallazgos.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
JavaScript
Estrellas
337
Forks
798
Merge medio
13 h 7 min
PR fusionados (30 d)
57

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de base/docs

Todos los issues de base/docs

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.