Add TypeScript types for WaveSurfer CDN and Lighthouse CI#27
Open
Add TypeScript types for WaveSurfer CDN and Lighthouse CI#27
Conversation
- 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
324f536 to
4145b82
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tsambient module declaration to provide TypeScript types for the WaveSurfer RegionsPlugin ESM build from CDN. This eliminates the need for@ts-expect-errorand inline type casts in_score.ts.Add Lighthouse CI to GitHub Actions: Implemented a new
lighthousejob in the workflow that runs after the build step. Configured with.lighthouserc.jsonto 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.tsexports typed interfaces forRegionParams,Region, andRegionsPluginInstance, matching the actual API used in_score.ts.Removed
@ts-expect-errorcomment and replaced inlineastype casts with a proper type import and single cast toRegionsPluginInstance.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