Skip to content

chore(deps-dev): run docov 0.2.2 at its strictest and document everything - #169

Merged
bnb merged 1 commit into
mainfrom
bnb/docov-strict
Nov 21, 2026
Merged

bnb merged 1 commit into
mainfrom
bnb/docov-strict

Conversation

@botandbang

Copy link
Copy Markdown
Contributor

This moves docov to 0.2.2 and turns on every option and rule nodevu can use, at its strictest, then writes the docs they ask for. docov now counts 93 items, up from 25, and all 93 pass every gate.

Added to docov.jsonc:

  • scope: all, members: all, commonjsMembers, virtual and globals under exports, so unexported declarations, typedef members, CommonJS members and @typedef blocks all count.
  • fileDocs: require: each file opens with a @file block.
  • completeThreshold, examplesThreshold, typesThreshold and releaseTagsThreshold at 100, and maxUndocumented: 0.
  • reportUnusedIgnores, and nested so a package config would be picked up if one is added.
  • require-throws (0.2.2 stops counting a throw in an async function, which rejects) and tsdoc-links at error.

Left off: tsdoc-escapes, tsdoc-html and tsdoc-params. They read every block as TSDoc, which flags the JSDoc {type}s that npm run types builds the types from, plus JSDoc's [optional] and dotted @param names. With the types masked out, escapes and html find nothing and params finds 53 params (37 missing -, 14 optional names, 2 dotted names). They can go on once docov can skip those. Options left at their defaults are already the strictest setting: kinds, access, excludeTags, ignoreDeprecated, skipGenerated and inherit: tag.

Docs: every file got a @file block, every item an @example and a description, every export @public, and every function typed and described @params and @returns. 55 items were undocumented and 13 had empty tag descriptions or a missing @returns. The example values were checked by running them against the fixtures snapshot and the static data. The types under */types/ are regenerated from the new JSDoc.

Also changed:

  • tsdoc.json defines @file.
  • opt's examples use import because opt's test reads require() calls out of index.js to check its dependencies.
  • docs/pages/translate.md named translate's parameter alias; it's legacyName.
  • A comment in core about isInPast's input described diffNow(), but the code calls diff(now). That comment is now the function's JSDoc, which describes what the function does.

…hing

- bump @docov/cli to 0.2.2, which leaves async functions out of require-throws
- count every module-level declaration, member, global, CommonJS member and @typedef, not just exports
- require a @file block per file, an @example and a description on every item, @PARAM and {type}s on every function, and @public on every export
- fail on any undocumented item and on docov-ignore comments that do nothing
- turn on require-throws and tsdoc-links
- define @file in tsdoc.json
- write the docs those checks asked for, and regenerate the types from them
- name translate's parameter legacyName in its docs page, as the code does
@botandbang
botandbang requested a review from bnb as a code owner November 20, 2026 16:50
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​docov/​cli@​0.2.1 ⏵ 0.2.267 +11009692 +1100

View full report

@bnb
bnb added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit 0d62775 Nov 21, 2026
36 checks passed
@bnb
bnb deleted the bnb/docov-strict branch November 21, 2026 18:21
@nodevu-ci nodevu-ci Bot mentioned this pull request Nov 21, 2026
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