Skip to content

Conversation

@marcalexiei
Copy link
Contributor

@marcalexiei marcalexiei commented Nov 2, 2025

Problem

N/A

Solution

This PR is a small proof of concept to try out Knip on this repository.

Currently, it includes analysis for the following packages and files:

  • Root package.json
  • scripts
  • integrations/docusaurus
  • integrations/fastify
    • removed customTheme from fastifyApiReference.ts.
      It was an empty string and wasn't exported from the package entry point so it wasn't part of the public API.
  • packages/mock-server

Although this PR introduces only a few changes,
it should provide a good initial sense of how Knip can help improve and maintain the project over time.
E.g.,

My plan is to proceed gradually with additional PRs to expand coverage.

Let me know what you think about this. Thanks!

Checklist

I've gone through the following:

  • I've added an explanation why this change is needed.
  • I've added a changeset (pnpm changeset).
  • I've added tests for the regression or new feature.
  • I've updated the documentation (Not needed).

Note

Adds Knip with CI integration and config, cleans unused code/deps, and removes the unused customTheme from fastify with a related test update.

  • CI/Tooling
    • Add Knip config (knip.jsonc) and CI job (knip) with pnpm lint:knip; gate required-ci-ok on it.
    • Install knip in root package.json; add lint:knip script.
    • Remove legacy .syncpackrc.
  • Fastify Integration
    • Remove unused customTheme and stop passing it to getHtmlDocument in fastifyApiReference.ts.
    • Tests: import vi; assert warning when no spec source is provided.
  • Scripts
    • Drop stdout-update dependency and the spinner output module (scripts/src/commands/output.ts).
    • Tighten internal APIs (make some helpers non-exported).
  • Packages
    • Minor package.json tweaks (e.g., integrations/docusaurus dev script fix; add @scalar/build-tooling).
    • Prune unused dev deps in @scalar/mock-server and its playground.
  • Misc
    • Point turbo.json schema to local path.
    • Update pnpm-workspace.yaml catalogs (remove stdout-update).

Written by Cursor Bugbot for commit 1ddf877. This will update automatically on new commits. Configure here.

@changeset-bot
Copy link

changeset-bot bot commented Nov 2, 2025

🦋 Changeset detected

Latest commit: 1ddf877

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
@scalar/fastify-api-reference Patch
@scalar/api-reference Patch
@scalarapi/docker-api-reference Patch
@scalar/aspire Patch
@scalar/aspnetcore Patch
@scalar/webjar Patch
@scalar/nuxt Patch
@scalar/api-reference-react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@marcalexiei marcalexiei force-pushed the knip branch 2 times, most recently from 85f86a0 to 8b9c0a0 Compare November 2, 2025 03:58
@marcalexiei marcalexiei marked this pull request as ready for review November 2, 2025 04:09
cursor[bot]

This comment was marked as outdated.

@marcalexiei marcalexiei mentioned this pull request Nov 3, 2025
4 tasks
Copy link
Member

@hanspagel hanspagel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it!

We can add it to the required checks, and remove it if we think it’s not helpful.

@marcalexiei

This comment was marked as outdated.

@marcalexiei marcalexiei requested a review from hanspagel November 3, 2025 11:27
@hanspagel
Copy link
Member

Ah, sorry, we don't need to add it to the "needs" array everywhere, we can just add it to the required checks, that’s enough I‘d say.

@marcalexiei
Copy link
Contributor Author

Now knip jobs is only referenced by "CI Required OK".

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