Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Type-check the TypeScript samples in the docs

Aberta
#201 7 comentários 0 reações 1 responsável Ver no GitHub

Mantenedores costumam responder em até 1 dia

@An16og já está trabalhando nisso.

Desde 21/10/2026.

  • #295 de @An16og — aberto

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
70/100
Tipo de issue
Funcionalidade
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
github-actions, node.js, typescript

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

documentation hacktoberfest help wanted testing

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 .mdx files, 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: skip first line. Keep the opt-outs few, and prefer making a sample complete.
  • Add a docs:check script and run it in CI after the build.
  • Fix the samples it flags.

Acceptance criteria

  • pnpm docs:check runs on dev and 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.

Linguagem predominante
TypeScript
Estrelas
13
Forks
7
Merge médio
3h 41min
PRs com merge (30d)
155

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de codercops/chatcops

Todas as issues de codercops/chatcops

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.