Skip to content

Add TypeScript types for WaveSurfer CDN and Lighthouse CI#27

Open
goude wants to merge 1 commit intomainfrom
claude/complete-backlog-items-34r5Q
Open

Add TypeScript types for WaveSurfer CDN and Lighthouse CI#27
goude wants to merge 1 commit intomainfrom
claude/complete-backlog-items-34r5Q

Conversation

@goude
Copy link
Copy Markdown
Owner

@goude goude commented Apr 7, 2026

Summary

This PR improves type safety for external CDN dependencies and adds performance monitoring to the CI/CD pipeline.

Key Changes

  • Type WaveSurfer RegionsPlugin CDN import: Created _regions.d.ts ambient module declaration to provide TypeScript types for the WaveSurfer RegionsPlugin ESM build from CDN. This eliminates the need for @ts-expect-error and inline type casts in _score.ts.

  • Add Lighthouse CI to GitHub Actions: Implemented a new lighthouse job in the workflow that runs after the build step. Configured with .lighthouserc.json to enforce accessibility standards (error threshold: 0.9) and warn on performance, SEO, and best-practices regressions.

Implementation Details

  • The ambient module declaration in _regions.d.ts exports typed interfaces for RegionParams, Region, and RegionsPluginInstance, matching the actual API used in _score.ts.

  • Removed @ts-expect-error comment and replaced inline as type casts with a proper type import and single cast to RegionsPluginInstance.

  • Lighthouse CI configuration uses temporary public storage for results and runs a single audit pass against the static dist directory.

  • Updated backlog to reflect completed tasks.

https://claude.ai/code/session_01Xo3opugkX7CwWd7F7Vr1od

- Add ambient module declaration (_regions.d.ts) for the WaveSurfer
  RegionsPlugin CDN ESM URL, removing @ts-expect-error and inline
  unknown casts from _score.ts.
- Add Lighthouse CI job to astro.yml (runs after build with @lhci/cli)
  and .lighthouserc.json with accessibility error threshold and
  performance/SEO/best-practices warnings.
- Mark both items completed in docs/backlog.md.

https://claude.ai/code/session_01Xo3opugkX7CwWd7F7Vr1od
@goude goude force-pushed the claude/complete-backlog-items-34r5Q branch from 324f536 to 4145b82 Compare April 7, 2026 13:29
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