Skip to content

chore(deps): update knip ✂️ and add enable treatConfigHintsAsErrors - #2786

Merged
ghostdevv merged 3 commits into
npmx-dev:mainfrom
TkDodo:tkdodo/knip-config-hints-as-errors
May 24, 2026
Merged

chore(deps): update knip ✂️ and add enable treatConfigHintsAsErrors#2786
ghostdevv merged 3 commits into
npmx-dev:mainfrom
TkDodo:tkdodo/knip-config-hints-as-errors

Conversation

@TkDodo

@TkDodoTkDodo commented May 24, 2026

Copy link
Copy Markdown
Contributor

🧭 Context

This PR updates knip to the latest version, which surfaced some new findings (unused export statements) and enables the treatConfigHintsAsErrors config, because vue-router was unnecessarily added to knips ignore config.

📚 Description

As knip and its plugins keeps getting better, exceptions added to ignoreDependencies or ignore in the knip config might become unnecessary, but will prevent knip from reporting it if it ever becomes unused. With treatConfigHintsAsErrors: true, knip will fail if it finds an unnecessar config, forcing us to delete said config, which is a good thing.

No AI was used to make this contribution.

@vercel

vercelBot commented May 24, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
npmx.devReadyReadyPreview, CommentMay 24, 2026 8:49am
2 Skipped Deployments
ProjectDeploymentActionsUpdated (UTC)
docs.npmx.devIgnoredIgnoredPreviewMay 24, 2026 8:49am
npmx-lunariaIgnoredIgnoredMay 24, 2026 8:49am

Request Review

@github-actions

Copy link
Copy Markdown

Hello! Thank you for opening your first PR to npmx, @TkDodo! 🚀

Here’s what will happen next:

  1. Our GitHub bots will run to check your changes.
    If they spot any issues you will see some error messages on this PR.
    Don’t hesitate to ask any questions if you’re not sure what these mean!

  2. In a few minutes, you’ll be able to see a preview of your changes on Vercel

  3. One or more of our maintainers will take a look and may ask you to make changes.
    We try to be responsive, but don’t worry if this takes a few days.

@coderabbitai

coderabbitaiBot commented May 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR makes several internal type aliases non-exported across type modules, removes @internal JSDoc from two CLI schemas, and upgrades/configures Knip (version and strict hint handling) with a workspace ignore adjustment.

Changes

API surface and tooling cleanup

Layer / File(s)Summary
Type exports internalization
app/types/chart.ts, app/types/command-palette.ts, app/types/navigation.ts, shared/schemas/blog.ts
Evolution option variants, command palette command variants, navigation structure components, and blog author schema become non-exported while maintaining their composed public union types.
Schema documentation annotation cleanup
cli/src/schemas.ts
OperationTypeSchema and OperationIdSchema are no longer marked with @internal JSDoc annotations; the exported validation constants and runtime behaviour are unchanged.
Knip strict mode adoption and configuration
package.json, knip.ts
Knip devDependency bumped to 6.14.2; treatConfigHintsAsErrors enabled and vue-router removed from workspace ignored dependencies.

Suggested reviewers

  • graphieros
  • userquin
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check nameStatusExplanation
Description check✅ PassedThe description accurately explains the context and rationale for the changes, relating to knip updates and the new configuration option.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Title check✅ PassedThe PR title mentions updating knip and enabling treatConfigHintsAsErrors, which directly aligns with the primary changes shown in knip.ts and package.json, though it does not capture the broader refactoring of type exports across multiple files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment threadcli/src/schemas.ts

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

those were reported by knip’s “Tag hints” as unnecessary. I removed them but haven’t found a way to make knip error out if there are tag hints.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I like this idea. I opened webpro-nl/knip#1767

Comment threadknip.ts
Comment on lines -34 to -36
/** Some components import types from here, but installing it directly could lead to a version mismatch */
'vue-router',

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

this was flagged by config hints

@codecov

codecovBot commented May 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@github-actions

This comment was marked as spam.

@TkDodoTkDodo changed the title ref(✂️): Update knip and add treat-config-hints-as-errors configrefactor(✂️): Update knip and add treatConfigHintsAsErrors configMay 24, 2026
@TkDodoTkDodo changed the title refactor(✂️): Update knip and add treatConfigHintsAsErrors configrefactor: Update knip ✂️ and add treatConfigHintsAsErrors configMay 24, 2026
@TkDodo

Copy link
Copy Markdown
ContributorAuthor

you don’t like custom scopes huh 😂

@TkDodoTkDodo changed the title refactor: Update knip ✂️ and add treatConfigHintsAsErrors configrefactor: update knip ✂️ and add treatConfigHintsAsErrors configMay 24, 2026

@serhalpserhalp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you! 🙌🏼

@ghostdevvghostdevv changed the title refactor: update knip ✂️ and add treatConfigHintsAsErrors configchore(deps): update knip and add enable treatConfigHintsAsErrorsMay 24, 2026
@socket-security

This comment was marked as resolved.

@socket-security

This comment was marked as spam.

@ghostdevvghostdevv changed the title chore(deps): update knip and add enable treatConfigHintsAsErrorschore(deps): update knip ✂️ and add enable treatConfigHintsAsErrorsMay 24, 2026
@ghostdevv
ghostdevv added this pull request to the merge queueMay 24, 2026
Merged via the queue into npmx-dev:main with commit d922052May 24, 2026
27 checks passed
@github-actionsgithub-actionsBot mentioned this pull request May 24, 2026
ayo-run pushed a commit to ayo-run/npmx.dev that referenced this pull request Aug 5, 2026
Sign up for freeto 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.

4 participants

@TkDodo@serhalp@ghostdevv@cylewaitforit