Skip to content

Add default value display to CLI help text#131

Draft
Copilot wants to merge 2 commits into
copilot/fix-issue-in-cli-commandfrom
copilot/fix-typos-in-documentation
Draft

Add default value display to CLI help text#131
Copilot wants to merge 2 commits into
copilot/fix-issue-in-cli-commandfrom
copilot/fix-typos-in-documentation

Conversation

Copilot AI commented Feb 15, 2026

Copy link
Copy Markdown

CLI help text now displays default values for flags, eliminating the need to consult source code or documentation for default behavior.

Changes

  • Help text generation (packages/jsdoc-cli/lib/help.js): Appends default values to flag descriptions with priority for defaultDescription over default property. Objects are JSON-serialized; other values use String() conversion. Null check prevents stringifying non-object defaults.

  • Test coverage (packages/jsdoc-cli/test/specs/lib/engine.js): Added tests verifying default values display correctly, custom descriptions take precedence, and flags without defaults remain unchanged.

Example output

--access <value>      Document only symbols with the specified access level.
                      Accepts these values: all, package, private, protected,
                      public, undefined Default: All except `private`

--destination <value> The output directory. Default: ./out

--encoding <value>    The encoding to assume when reading source files. 
                      Default: utf8

--help                Print help information and exit.

Handles edge cases: 0, false, "", null, and complex objects via JSON serialization.

Original prompt

Pull request: https://github.com/Goo78/jsdoc/pull/130/files


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: Goo78 <163220761+Goo78@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix typos in JSDoc documentation Add default value display to CLI help text Feb 15, 2026
Copilot AI requested a review from Goo78 February 15, 2026 13:28
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