Skip to content

show actual lint output in deno doc tutorial#3129

Merged
bartlomieju merged 1 commit into
mainfrom
docs-improve/deno-doc-lint-output
May 14, 2026
Merged

show actual lint output in deno doc tutorial#3129
bartlomieju merged 1 commit into
mainfrom
docs-improve/deno-doc-lint-output

Conversation

@lunadogbot
Copy link
Copy Markdown
Contributor

The linting section of examples/tutorials/deno_doc.md introduces
deno doc --lint and provides a bad_example.ts to lint, but never
shows what the linter actually prints — it just ends with "will show
errors for these issues". A reader new to deno doc is left guessing
at the format and at the error names they should look for.

This PR replaces the prose list of problem categories with the three
named error codes the linter actually emits (missing-jsdoc,
missing-return-type, private-type-ref) and pastes the verbatim
output deno doc --lint bad_example.ts produces against the existing
sample file. A trailing paragraph notes that --lint exits non-zero
when it finds errors, which is the bit that matters for anyone
wiring it into CI or a deno task doc:lint entry.

Verified by writing the exact bad_example.ts from the page and
running deno doc --lint bad_example.ts against denoland/deno
2.7.14 (canary was unavailable on the worker, so used the alpine
tag at the same Deno minor that ships the lint codes); the pasted
console block is the literal output captured with NO_COLOR=1.

Closes bartlomieju/orchid-inbox#46

Expand the linting section of the deno doc tutorial so readers see
what `deno doc --lint` actually prints. The previous version listed
the categories of problems in prose and ended with "will show errors
for these issues", leaving readers to guess at the format. Replaced
the prose list with the named error codes (`missing-jsdoc`,
`missing-return-type`, `private-type-ref`) and added the full
verbatim output the bad example produces, along with the fact that
the command exits non-zero so it slots into CI cleanly.

Verified by running `deno doc --lint bad_example.ts` against
denoland/deno:alpine 2.7.14 with the exact `bad_example.ts` from the
page; pasted output captured with NO_COLOR=1.
@lunadogbot
Copy link
Copy Markdown
Contributor Author

@bartlomieju ready for review when you have a moment.

@bartlomieju bartlomieju merged commit 80bbd46 into main May 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants