cloudflare-docs icon indicating copy to clipboard operation
cloudflare-docs copied to clipboard

[Docs Site] Fixes all Astro TypeScript issues

Open Cherry opened this issue 5 months ago • 0 comments

Summary

This PR updates many components and files to use proper TypeScript syntax and types wherever possible. There are a few cases, namely with specific schemas that haven't been typed yet, where any is used, and a few @ts-expect-error comments where it's not worth fixing, or types are just wrong from imported libs, but otherwise this should be holistic, with no functional changes.

Before:

- 235 errors
- 0 warnings
- 28 hints

After:

- 0 errors
- 0 warnings
- 2 hints

This also updates/tweaks a few other miscellaneous things:

  • Sets all dependencies as devDependencies in package.json instead of a weird mix between the two
  • Bumps all deps to latest minor versions, or new majors where no impactful breaking changes
  • Adds a few missing @types dev dependencies for libraries used
  • Cleans up very old scripts that are no longer used in bin directory
  • Updates the PR workflow to add type checking. This is only on files Astro knows about, and won't block for formatting
  • Adds manually defined types for astro-live-code, since this doesn't ship TS definitions
  • Fixes a few warnings on startup from astro build / astro dev
  • And in the process of fixing files, quite a handful got formatted with prettier as per this repo's config

Documentation checklist

Cherry avatar Aug 26 '24 15:08 Cherry