Type-check the TypeScript samples in the docs
Les mainteneurs répondent en général sous 1 jour
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 70/100
- Type d'issue
- Fonctionnalité
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- github-actions, node.js, typescript
- Domaine
- ci-cd, documentation, testing, tooling
Piste de recherche
Read CONTRIBUTING.md for the pnpm setup and build steps, then inspect the TypeScript blocks in website/src/content/docs/**/*.mdx and the CI workflow. Add a checker that extracts and type-checks the samples against the built packages, supports // docs-check: skip, and reports file and line; add docs:check to CI and fix flagged samples. Done when pnpm docs:check passes on dev, reports checked and skipped counts, and a deliberately broken sample fails with its location.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
The docs have 67 typescript code blocks across website/src/content/docs/**/*.mdx, and nothing checks that they still compile against the packages. Past PRs (#52, #135) fixed samples that imported paths that don't exist and called constructors the wrong way; the next API change will break some again without anyone noticing.
What to do
- Add a script, for example
scripts/check-doc-samples.mjs, that pulls every ```typescript block out of the.mdxfiles, writes each to a temporary `.ts` file, and type-checks them with `tsc --noEmit` against the built packages (`@chatcops/core`, `@chatcops/server`, `@chatcops/widget`). - Blocks that are fragments on purpose (a config object on its own, a type signature) can opt out with a
// docs-check: skipfirst line. Keep the opt-outs few, and prefer making a sample complete. - Add a
docs:checkscript and run it in CI after the build. - Fix the samples it flags.
Acceptance criteria
-
pnpm docs:checkruns ondevand passes, with the number of checked and skipped blocks printed - Breaking a sample on purpose (put the diff in the PR description) makes it fail with the file and line
- CI runs it
- No changeset needed (tooling and docs)
Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off dev, and open your PR against dev with Closes #<this issue number>. Setup notes (pnpm, build before test) are in CONTRIBUTING.md.
- Langage dominant
- TypeScript
- Étoiles
- 13
- Forks
- 7
- Merge moyen
- 3 h 33 min
- PR mergées (30 j)
- 176
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de codercops/chatcops
-
Add startup checks that catch weak or leaked security settingsPeut-être pris @varun-pahuja l’a pris il y a 2 jours. Ouverteenhancement good first issue hacktoberfest server
codercops/chatcops#231 · 3 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Hacktoberfest 2026: start hereOuvertehacktoberfest
Difficulté 1/5 Moins d'une heure Accessibilité débutants 35/100
Les mainteneurs répondent en général sous 1 jour
-
Add built-in translations to the widgetPeut-être pris @piyusshhjangid l’a pris il y a 1 jour. Ouvertehelp wanted widget
Difficulté 4/5 3-5 jours Accessibilité débutants 52/100
codercops/chatcops#55 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de codercops/chatcops
Issues similaires
-
area:agent-view area:tui bug platform:macos
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
anthropics/claude-code#104558 ·
Les mainteneurs répondent en général sous 1 jour
-
[CURRICULUM] computation fakdOuverteupdater
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
UniversityOfHelsinkiCS/oodikone#5141 ·
-
maintanance
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
inmanta/web-console#7606 ·
Les mainteneurs répondent en général sous 1 jour
-
bug skills
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
equinor/fusion-framework#5846 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 74/100