Skip to content

feat: validate JSDoc/TSDoc quality on existing doc comments - #6

Merged
Mearman merged 2 commits into
mainfrom
feat/jsdoc-tsdoc-rules
Sep 12, 2026
Merged

Mearman merged 2 commits into
mainfrom
feat/jsdoc-tsdoc-rules

Conversation

@Mearman

@Mearman Mearman commented Sep 12, 2026

Copy link
Copy Markdown
Member

Adds eslint-plugin-jsdoc and eslint-plugin-tsdoc to the default config, using eslint-plugin-jsdoc's flat/recommended-tsdoc-error preset (tuned for TSDoc-flavoured comments such as {@link} and @remarks) with its presence/"requirements" tier turned off — a missing doc comment is not flagged, only an existing one that's internally inconsistent, has an unresolvable type, or uses an invalid tag. eslint-plugin-tsdoc's tsdoc/syntax rule is registered separately (that plugin ships no configs export) to validate that a doc comment actually parses as valid TSDoc.

The requirements tier (require-jsdoc, require-param, require-returns, and siblings) is deliberately excluded: forcing every function everywhere to carry a doc comment is a much bigger policy than "add these two plugins," and eslint-plugin-jsdoc's own autofix for a missing block inserts an empty, contentless stub rather than anything useful — confirmed directly, it did this to 22 files in this repo's own source on the first pass before the tier was excluded.

Second commit raises the vitest suite timeout for @typescript-eslint/rule-tester cases (unrelated pre-existing flakiness this PR's own CI run surfaced under host contention, not caused by the jsdoc/tsdoc change) — each case runs a real TS program per type-aware rule test, which exceeds vitest's 5000ms default under load.

@Mearman
Mearman marked this pull request as ready for review September 12, 2026 08:48
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review Completed 2026-09-12T08:52:22.699709Z 5bfc429 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Mearman
Mearman force-pushed the feat/jsdoc-tsdoc-rules branch from 5bfc429 to d08f2bc Compare September 12, 2026 09:01
Add eslint-plugin-jsdoc and eslint-plugin-tsdoc to the default config,
using eslint-plugin-jsdoc's flat/recommended-tsdoc-error preset (tuned
for TSDoc-flavoured comments such as {@link} and @remarks) with its
requirements tier turned off: a missing doc comment is not flagged,
only an existing one that is internally inconsistent, has an
unresolvable type, or uses an invalid tag. eslint-plugin-tsdoc's
tsdoc/syntax rule is registered separately, since that plugin ships no
configs export of its own, to validate that a doc comment actually
parses as valid TSDoc.

The requirements tier (require-jsdoc, require-param, require-returns,
and siblings) is deliberately excluded: forcing every function
everywhere to carry a doc comment is a much larger policy this change
isn't making, and eslint-plugin-jsdoc's own autofix for a missing
block inserts an empty, contentless stub rather than anything useful.
@typescript-eslint/rule-tester runs a real TypeScript program (parse
and type-check) per test case for every type-aware custom rule under
src/rules/, which routinely exceeds vitest's generic 5000ms default,
especially under contention on a shared developer machine running
other concurrent CPU-heavy work. Each case's actual check is still a
small, synchronous operation, so a longer ceiling tolerates slow
execution without masking a real regression.
@Mearman
Mearman force-pushed the feat/jsdoc-tsdoc-rules branch from d08f2bc to 8783f52 Compare September 12, 2026 09:15
@Mearman
Mearman enabled auto-merge (rebase) September 12, 2026 09:15
@Mearman
Mearman merged commit 9c5cf64 into main Sep 12, 2026
6 checks passed
@Mearman
Mearman deleted the feat/jsdoc-tsdoc-rules branch September 12, 2026 09:16
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant