Repository navigation
JSDoc improvements - #84
Merged
Merged
Conversation
The hover for `css` did not render: its `@example` started with the prose `input:` before the fence, and tsgo only passes an example through as markdown when it starts with a fence, otherwise it wraps the whole example in one literal code block. Start every example with a fenced block, and give each block its own captioned `@example` — rendered code blocks have no background and only an 8px gap, so two fences in one example read as a single block. `@default` values move into code spans. tsgo renders the value as inline markdown, which ate the backslashes of the two regex defaults and displayed a different pattern than the one documented. Captions go on the line after `@example`, never on the tag line: text on the tag line moves the comment margin to that column, which strips the indentation from every following line. `css` had no summary, only an example, and `ecij` had no documentation at all despite being what users hover in their config. Both now carry a summary, `@returns` and `@see`, plus `@throws` on `css` for the runtime throw and `@param` on `ecij`. The `Configuration` members drop the line restating the type, which the hover already shows above the description. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Reviews all the JSDoc in the repo for how it actually renders in a VS Code hover, rather than for how it reads in the source.
Hovers are markdown, and JSDoc tags are reformatted before rendering — by the TypeScript extension for the bundled compiler, and server-side by the native preview (tsgo). Both were checked by driving the tsgo LSP server directly and by running the bundled TypeScript through the extension's own tag formatting.
Fixes
csshover did not render. Its@examplestarted with the proseinput:before the fence, and tsgo passes an example through as markdown only when it starts with a fence — otherwise it wraps the whole example in one literal code block,```jsmarkers and all. Every example now starts with a fenced block.@defaultvalues displayed the wrong pattern. tsgo renders the value as inline markdown, so@default /\.[cm]?[jt]sx?$/lost its backslashes and showed/.[cm]?[jt]sx?$/. The values moved into code spans, which keeps them intact.@example. Text on the tag line moves the comment margin to that column, which strips the indentation from every following line — nested example code came out flush-left in both engines.@example. Rendered code blocks have no background and only an 8px margin, so the JS and CSS halves of the build output read as one continuous block.Tags
csshad no summary at all, only an example — that summary is what autocomplete and the first hover line show.ecij()had no documentation at all, despite being the symbol users hover in their Vite or Rolldown config. Both now have a summary,@returnsand@see;cssdocuments the runtime throw with@throws, andecijdocuments its argument with@param.Configurationgains an interface-level doc with a{@link ecij}cross-link, and each member drops the "Can be a string, RegExp, or array" line — the hover already prints the type directly above the description. Four line comments (theScopemembers and the two module caches) became JSDoc so they show up on hover at all.README.mdduplicates theConfigurationinterface verbatim and is updated to match.Checks
format:check,typecheck,buildand all 10 tests pass. The.d.tsbuild preserves the new comments intact.🤖 Generated with Claude Code