Skip to content

build: migrate JSDoc linting off removed core rules - #10965

Merged
kgryte merged 3 commits into
developfrom
philipp/gh54-jsdoc-migration
Aug 19, 2026
Merged

kgryte merged 3 commits into
developfrom
philipp/gh54-jsdoc-migration

Conversation

@Planeshifter

@Planeshifter Planeshifter commented Mar 15, 2026 •

Copy link
Copy Markdown
Member

Progresses stdlib-js/metr-issue-tracker#54.

Description

What is the purpose of this pull request?

This pull request:

  • Replaces deprecated ESLint core rules require-jsdoc and valid-jsdoc (both removed in ESLint v9) with eslint-plugin-jsdoc equivalents.
  • Migrates require-jsdoc to jsdoc/require-jsdoc while preserving the existing declaration requirements.
  • Replaces valid-jsdoc with focused jsdoc/* rules for descriptions, parameter coverage/names/types/descriptions, return coverage/types/descriptions, and canonical tag names.
  • Preserves the former function/class validation scope and the @class to @constructor preference through shared jsdoc settings.
  • Registers the jsdoc plugin in etc/eslint/plugins/index.js.
  • Updates both the path overrides and the standalone test, benchmark, example, and Markdown configurations that disable required JSDoc comments.
  • Fixes existing malformed JSDoc exposed by the stricter parser (two unclosed code fences, an invalid optional parameter, a duplicated option name, and an invalid tag typo).
  • Prevents executable doctests for the ESLint rule catalog, whose intentionally invalid examples include nonterminating loops; all other linting remains enabled for those files.

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.

PR #10952 has merged, and this branch is rebased directly onto develop. The TypeScript migration remains isolated to the child PR #10966.

The removed core rule treated any value-returning path as sufficient. jsdoc/require-returns-check instead requires a value on every path and produces false positives for stdlib functions documented as (T|void), so it is intentionally not enabled. jsdoc/require-returns preserves the missing-return-tag check without imposing that incompatible all-path behavior.

The migrated rules were validated against the complete Make inventories for sources, tests, examples, and benchmarks.

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.".

This PR was written with Claude Code and Codex assistance.


@stdlib-js/reviewers

@Planeshifter Planeshifter changed the title bench: migrate JSDoc linting off removed core rules build: migrate JSDoc linting off removed core rules Mar 15, 2026
@Planeshifter
Planeshifter force-pushed the philipp/gh54-jsdoc-migration branch 2 times, most recently from c22d878 to e0e5a99 Compare March 15, 2026 14:16
@Planeshifter
Planeshifter force-pushed the philipp/gh54-jsdoc-migration branch from e0e5a99 to 0201b91 Compare March 15, 2026 15:33
@Planeshifter
Planeshifter force-pushed the philipp/gh54-jsdoc-migration branch from 0201b91 to b0f5533 Compare March 15, 2026 16:25
@Planeshifter Planeshifter changed the title build: migrate JSDoc linting off removed core rules build: migrate JSDoc linting off removed core rules (gh54 part III) Mar 15, 2026
@Planeshifter
Planeshifter force-pushed the philipp/gh54-jsdoc-migration branch from b0f5533 to 28cbc14 Compare March 15, 2026 17:46
@Planeshifter Planeshifter added the METR Pull request associated with the METR project. label Mar 18, 2026
@stdlib-bot stdlib-bot added the Merge Conflicts Pull request which has merge conflicts. label Mar 23, 2026
@github-actions github-actions Bot mentioned this pull request Mar 23, 2026
Base automatically changed from philipp/gh54-eslint-plugin-n to develop April 26, 2026 12:50
@kgryte

kgryte commented Apr 26, 2026

Copy link
Copy Markdown
Member

@Planeshifter Sorry. I think I did it again where I deleted the "base" branch. You'll need to do what you did last time, as I was not able to restore the branch via the web UI.

@Planeshifter
Planeshifter force-pushed the philipp/gh54-jsdoc-migration branch from 28cbc14 to 0f4f56f Compare August 16, 2026 06:06
Replace deprecated ESLint core rules `require-jsdoc` and `valid-jsdoc`
(removed in ESLint v9) with `eslint-plugin-jsdoc` equivalents:

- `require-jsdoc` → `jsdoc/require-jsdoc` (same option schema)
- `valid-jsdoc` → individual `jsdoc/*` rules:
  - `jsdoc/require-description` (replaces `matchDescription`)
  - `jsdoc/require-param-description` (replaces `requireParamDescription`)
  - `jsdoc/require-returns-type` (replaces `requireReturnType`)
  - `jsdoc/require-returns-description` (replaces `requireReturnDescription`)
  - `jsdoc/check-tag-names` (validates tag names)
- Register `jsdoc` plugin in `etc/eslint/plugins/index.js`
- Update override files that disable `require-jsdoc` for tests,
  benchmarks, examples, and markdown

Ref: stdlib-js/metr-issue-tracker#54
@Planeshifter
Planeshifter force-pushed the philipp/gh54-jsdoc-migration branch from 0f4f56f to 9f58156 Compare August 16, 2026 06:08
@Planeshifter Planeshifter removed the Merge Conflicts Pull request which has merge conflicts. label Aug 16, 2026
@Planeshifter
Planeshifter force-pushed the philipp/gh54-jsdoc-migration branch from 9f58156 to 2d39d88 Compare August 16, 2026 06:28
Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com>
@Planeshifter
Planeshifter force-pushed the philipp/gh54-jsdoc-migration branch from 2d39d88 to c87a756 Compare August 16, 2026 06:31
The Make source-lint configuration loads this override module for all JavaScript source files, not only REPL namespace files. Rename the module now that it also contains the ESLint rule-catalog doctest exclusion so its filename accurately reflects its responsibility.

Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com>
@Planeshifter
Planeshifter marked this pull request as ready for review August 19, 2026 00:23
@Planeshifter
Planeshifter requested a review from a team August 19, 2026 00:23
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Aug 19, 2026

@kgryte kgryte left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@kgryte kgryte changed the title build: migrate JSDoc linting off removed core rules (gh54 part III) build: migrate JSDoc linting off removed core rules Aug 19, 2026
@kgryte
kgryte merged commit fd16a2f into develop Aug 19, 2026
29 checks passed
@kgryte kgryte removed the Needs Review A pull request which needs code review. label Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

METR Pull request associated with the METR project.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants