Skip to content

fix: add JSDoc documentation for JSR API docs#177

Merged
jaypatrick merged 2 commits intomasterfrom
fix/jsr-api-documentation
Jan 15, 2026
Merged

fix: add JSDoc documentation for JSR API docs#177
jaypatrick merged 2 commits intomasterfrom
fix/jsr-api-documentation

Conversation

@jaypatrick
Copy link
Owner

Summary

  • Fix JSR API documentation which was showing empty/broken links
  • Add comprehensive JSDoc comments to all exported symbols
  • Pass deno doc --lint validation (0 errors, down from 188)

Problem

The JSR package page was showing API documentation links that led to nothing. This was caused by deno doc --lint failing to validate the documentation, which prevented JSR from generating proper API docs.

Root Causes

  1. @inheritdoc not recognized: Deno doc --lint doesn't recognize the @inheritdoc JSDoc tag
  2. Missing JSDoc: Many exported symbols (classes, interfaces, methods, properties) were missing documentation
  3. Missing type annotations: Properties like public readonly type = TransformationType.X needed explicit types

Changes

Modified 47 files to add proper JSDoc documentation:

  • Diagnostics: Replaced all @inheritdoc with full JSDoc in NoOpDiagnosticsCollector
  • Formatters: Replaced @inheritdoc in 6 formatter subclasses
  • Transformations: Added JSDoc and explicit type annotations to 14 transformation classes
  • Compilers: Added constructor JSDoc to SourceCompiler, FilterCompiler, IncrementalCompiler, HeaderGenerator
  • Platform: Added JSDoc to WorkerCompiler, PlatformDownloader, HttpFetcher, etc.
  • Services: Added JSDoc to FilterService, TransformationRegistry
  • Utils: Added JSDoc to EventEmitter, ErrorUtils, Benchmark, StringUtils
  • Plugins: Added JSDoc to PluginSystem, PluginRegistry, PluginTransformationWrapper
  • Diff: Added JSDoc to DiffGenerator
  • Downloader: Added JSDoc to FilterDownloader

Test plan

  • deno doc --lint src/index.ts passes with 0 errors
  • deno publish --dry-run --allow-dirty succeeds
  • All 832 tests pass
  • deno fmt && deno lint && deno check pass

🤖 Generated with Claude Code

Fix JSR API documentation which was showing empty/broken links due to
deno doc --lint validation errors. The lint was failing because:

1. @inheritdoc tag is not recognized by deno doc --lint
2. Exported symbols were missing JSDoc comments
3. Type properties needed explicit type annotations

Changes:
- Replace all @inheritdoc with full JSDoc comments
- Add JSDoc to all exported class constructors, methods, and properties
- Add explicit type annotations (e.g., `public readonly type: TransformationType`)
- Add JSDoc to interface properties

Files modified (47 files):
- Diagnostics: DiagnosticsCollector.ts
- Formatters: OutputFormatter.ts
- Transformations: 14 transformation files
- Compilers: SourceCompiler.ts, FilterCompiler.ts, IncrementalCompiler.ts, HeaderGenerator.ts
- Platform: WorkerCompiler.ts, PlatformDownloader.ts, HttpFetcher.ts, etc.
- Services: FilterService.ts, TransformationRegistry.ts
- Utils: EventEmitter.ts, ErrorUtils.ts, Benchmark.ts, StringUtils.ts
- Plugins: PluginSystem.ts
- Diff: DiffReport.ts
- Downloader: FilterDownloader.ts

Results:
- deno doc --lint: 0 errors (down from 188)
- deno publish --dry-run: Success
- All 832 tests passing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 15, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
adblock-compiler 62e2f74 Jan 15 2026, 08:11 AM

@github-actions
Copy link

Version bumped: 0.8.4 -> 0.8.5

@jaypatrick jaypatrick requested a review from Copilot January 15, 2026 08:11
@jaypatrick jaypatrick self-assigned this Jan 15, 2026
@jaypatrick jaypatrick merged commit fb924a7 into master Jan 15, 2026
5 checks passed
@jaypatrick jaypatrick deleted the fix/jsr-api-documentation branch January 15, 2026 08:11
Copy link

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

This PR fixes JSR API documentation by adding comprehensive JSDoc comments to all exported symbols. The change addresses empty/broken API documentation links on the JSR package page, which was caused by deno doc --lint validation failures (188 errors, now down to 0).

Changes:

  • Added JSDoc documentation to 47 files covering transformations, compilers, formatters, diagnostics, utilities, and platform abstractions
  • Replaced non-standard @inheritdoc tags with explicit JSDoc in NoOpDiagnosticsCollector
  • Added explicit type annotations to transformation classes (e.g., public readonly type: TransformationType)
  • Version bumped from 0.8.4 to 0.8.5 across all configuration files
  • Alphabetized imports and exports in workflow files (formatting cleanup)

Reviewed changes

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

Show a summary per file
File Description
src/version.ts Version bump to 0.8.5
src/types/index.ts Added JSDoc to interface properties
src/transformations/*.ts Added JSDoc and explicit type annotations to 14 transformation classes
src/utils/*.ts Added JSDoc to StringUtils, EventEmitter, ErrorUtils, Benchmark
src/diagnostics/DiagnosticsCollector.ts Replaced @inheritdoc with explicit JSDoc in NoOpDiagnosticsCollector
src/formatters/OutputFormatter.ts Added JSDoc to BaseFormatter and 6 formatter subclasses; exported BaseFormatter
src/compiler/*.ts Added constructor JSDoc to SourceCompiler, IncrementalCompiler, HeaderGenerator
src/platform/*.ts Added JSDoc to WorkerCompiler, PlatformDownloader, HttpFetcher, etc.
src/services/FilterService.ts Added constructor JSDoc
src/plugins/PluginSystem.ts Added JSDoc to PluginRegistry, PluginTransformationWrapper
src/diff/DiffReport.ts Added constructor JSDoc to DiffGenerator
src/downloader/FilterDownloader.ts Added constructor JSDoc
src/index.ts Added BaseFormatter, BaseError, BenchmarkResult, CompilationMetrics, AnyDiagnosticEvent to exports
worker/workflows/*.ts Alphabetized imports; improved string concatenation formatting
package.json, deno.json, wrangler.toml Version bump to 0.8.5

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.

1 participant