show actual lint output in deno doc tutorial#3129
Merged
Merged
Conversation
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.
Contributor
Author
|
@bartlomieju ready for review when you have a moment. |
bartlomieju
approved these changes
May 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The linting section of
examples/tutorials/deno_doc.mdintroducesdeno doc --lintand provides abad_example.tsto lint, but nevershows what the linter actually prints — it just ends with "will show
errors for these issues". A reader new to
deno docis left guessingat 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 verbatimoutput
deno doc --lint bad_example.tsproduces against the existingsample file. A trailing paragraph notes that
--lintexits non-zerowhen it finds errors, which is the bit that matters for anyone
wiring it into CI or a
deno task doc:lintentry.Verified by writing the exact
bad_example.tsfrom the page andrunning
deno doc --lint bad_example.tsagainstdenoland/deno2.7.14 (
canarywas unavailable on the worker, so used the alpinetag 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