cnumr / cnumr/best-practices-packaged-software
fix: corriger le champ tiers (string → array) dans les fiches MDX
- Dominant language
- TypeScript
- Stars
- 2
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
## Contexte
Identifié depuis cnumr/gen-referentiel-core#43.
Le schéma de validation (`content/fiche.schema.yaml` dans `gen-referentiel-core`) définit le champ `tiers` comme un tableau (`type: array, minItems: 1`). Or **15 fiches** dans ce repo ont `tiers` défini comme une simple chaîne de caractères, ce qui génère des warnings `remark-lint-frontmatter-schema` à chaque `pnpm lint:md`.
## Exemple
\`\`\`yaml
# ❌ actuel (string)
tiers: user-device
# ✅ attendu (array)
tiers:
- user-device
\`\`\`
## Correction
\`\`\`bash
# macOS / BSD sed
find src/content/fiches -name "*.mdx" -exec \
sed -i '' 's/^tiers: \(.*\)$/tiers:\n - \1/' {} +
# GNU sed (Linux)
find src/content/fiches -name "*.mdx" -exec \
sed -i 's/^tiers: \(.*\)$/tiers:\n - \1/' {} +
\`\`\`
Valider ensuite avec `pnpm lint:md` dans `gen-referentiel-core`.
## Issue liée
cnumr/gen-referentiel-core#43
Contributor guide
Research direction
Search the 15 affected MDX files under src/content/fiches for scalar tiers frontmatter and compare them with the array shape required by content/fiche.schema.yaml in gen-referentiel-core. Run pnpm lint:md from gen-referentiel-core after the edits. Done means every tiers value is an array and the frontmatter-schema warnings are gone.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- yaml
- Domain
- content, documentation
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 75/100