Skip to content

Conversation

Mister-Hope
Copy link
Member

No description provided.

@Mister-Hope Mister-Hope requested review from pengzhanbo and Copilot June 4, 2025 12:22
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Add comprehensive JSDoc comments to various parts of the highlighter-helper package, improving inline documentation and examples.

  • Introduces JSDoc blocks for regex constants, resolver functions, plugins, options, and client composables
  • Provides bilingual (English/Chinese) descriptions and code examples for each public API
  • Enhances code readability and assists IDE tooling with type information and usage guidance

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tools/highlighter-helper/src/node/whitespace.ts Add JSDoc for regex constants and types
tools/highlighter-helper/src/node/utils/resolveAttr.ts Add JSDoc for resolveAttr utility
tools/highlighter-helper/src/node/lineNumbers/resolveLineNumbers.ts Add JSDoc for resolveLineNumbers function
tools/highlighter-helper/src/node/lineNumbers/plugin.ts Add JSDoc for lineNumbers plugin
tools/highlighter-helper/src/node/lineNumbers/options.ts Add JSDoc for line-numbers options interface
tools/highlighter-helper/src/node/collapsedLines/resolveCollapsedLine.ts Add JSDoc for resolveCollapsedLines
tools/highlighter-helper/src/node/collapsedLines/plugin.ts Add JSDoc for collapsedLines plugin
tools/highlighter-helper/src/node/collapsedLines/options.ts Add JSDoc for collapsed-lines options
tools/highlighter-helper/src/node/codeBlockTitle/plugin.ts Add JSDoc for codeBlockTitle plugin
tools/highlighter-helper/src/node/codeBlockTitle/options.ts Add JSDoc for code-block-title options
tools/highlighter-helper/src/client/composables/setupCollapsedLines.ts Add JSDoc for client-side collapsed lines setup
Comments suppressed due to low confidence (5)

tools/highlighter-helper/src/client/composables/setupCollapsedLines.ts:3

  • Consider adding a @returns tag to explicitly document that this setup function returns void.
/**

tools/highlighter-helper/src/node/whitespace.ts:30

  • Clarify in the JSDoc what the true value for globalOption signifies, since it isn't covered by the WhitespacePosition union.
* @param globalOption - Global whitespace option / 全局空白符选项

tools/highlighter-helper/src/node/lineNumbers/plugin.ts:5

  • Add a @returns tag to this JSDoc block to indicate the plugin function returns void.
/**

tools/highlighter-helper/src/node/collapsedLines/plugin.ts:5

  • Include a @returns tag here to make explicit that this plugin function does not return a value.
/**

tools/highlighter-helper/src/node/codeBlockTitle/plugin.ts:23

  • Consider documenting the return type with a @returns tag to clarify that this plugin registration returns void.
/**

@coveralls
Copy link

Pull Request Test Coverage Report for Build 15442162991

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 3 unchanged lines in 3 files lost coverage.
  • Overall coverage remained the same at 59.858%

Files with Coverage Reduction New Missed Lines %
tools/highlighter-helper/lib/node/codeBlockTitle/plugin.js 1 80.0%
tools/highlighter-helper/lib/node/collapsedLines/resolveCollapsedLine.js 1 88.24%
tools/highlighter-helper/lib/node/whitespace.js 1 91.3%
Totals Coverage Status
Change from base Build 15441937974: 0.0%
Covered Lines: 1319
Relevant Lines: 1992

💛 - Coveralls

@Mister-Hope Mister-Hope merged commit a3dfc9d into main Jun 5, 2025
30 checks passed
@Mister-Hope Mister-Hope deleted the highlighter-helper-jsdoc branch June 5, 2025 04:03
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.

3 participants