Skip to content

feat: add jsdoc-param-hyphen-spacing ESLint rule#13665

Open
ujjwalv01 wants to merge 2 commits into
stdlib-js:developfrom
ujjwalv01:feat-jsdoc-param-hyphen-spacing
Open

feat: add jsdoc-param-hyphen-spacing ESLint rule#13665
ujjwalv01 wants to merge 2 commits into
stdlib-js:developfrom
ujjwalv01:feat-jsdoc-param-hyphen-spacing

Conversation

@ujjwalv01

@ujjwalv01 ujjwalv01 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Resolves #13662.

Description

What is the purpose of this pull request?

This pull request:

  • Adds the jsdoc-param-hyphen-spacing ESLint rule to enforce exactly one space before and after the hyphen separating a parameter name from a parameter description in JSDoc @param tags.
  • Implements customizable before and after boolean options (defaulting to true, consistent with rules like comma-spacing or tag-spacing).
  • Includes comprehensive unit test suites covering valid single spacing, invalid extra/missing whitespace around hyphens, invalid separator characters, and custom options.
  • Registers and documents the new rule in @stdlib/_tools/eslint/rules.

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

I consulted AI assistance (Gemini) to understand the existing @stdlib/_tools/eslint architecture, AST visitor patterns, and package conventions, but the code and tests were authored manually by myself.


@stdlib-js/reviewers

@ujjwalv01
ujjwalv01 requested a review from a team July 26, 2026 10:06
@stdlib-bot stdlib-bot added Tools Issue or pull request related to project tooling. Needs Review A pull request which needs code review. labels Jul 26, 2026
@ujjwalv01 ujjwalv01 changed the title feat: add \jsdoc-param-hyphen-spacing\ ESLint rule feat: add jsdoc-param-hyphen-spacing ESLint rule Jul 26, 2026
@ujjwalv01
ujjwalv01 force-pushed the feat-jsdoc-param-hyphen-spacing branch from 408bf6a to 3fffb31 Compare July 26, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review A pull request which needs code review. Tools Issue or pull request related to project tooling.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC]: add JSDoc lint rule to enforce whitespace before and after dash

2 participants