Skip to content

chore(deps): upgrade knip to v6 and enable treatConfigHintsAsErrors#212

Merged
kodiakhq[bot] merged 7 commits into
mainfrom
chore/knip-config-hints-as-errors
May 27, 2026
Merged

chore(deps): upgrade knip to v6 and enable treatConfigHintsAsErrors#212
kodiakhq[bot] merged 7 commits into
mainfrom
chore/knip-config-hints-as-errors

Conversation

@RedStar071

@RedStar071 RedStar071 commented May 26, 2026

Copy link
Copy Markdown
Member

🔗 Linked issue

N/A

🧭 Context

Knip v6 introduced treatConfigHintsAsErrors and resolved several false-positive
ignoreExportsUsedInFile workarounds that were required in v5. This PR upgrades
knip to the latest v6 release and cleans up the config accordingly.

📚 Description

  • Upgrade knip from 5.88.1 to 6.14.2
  • Enable treatConfigHintsAsErrors: true so config hints surface as CI errors
  • Remove now-resolved ignoreExportsUsedInFile entries (vue, vue-router,
    h3, nitropack/*, ofetch, @unhead/vue, @netlify/nuxt) — knip v6
    correctly resolves these Nuxt/Nitro/Vite virtual imports without workarounds
  • Change export namespace to namespace in shared/types/configurableData.ts
    to satisfy knip v6's stricter unused-export detection, with oxlint-disable
    comments since the types are consumed indirectly

- Upgrade knip from 5.88.1 to 6.14.2
- Enable treatConfigHintsAsErrors in knip config
- Remove now-resolved ignoreExportsUsedInFile entries for vue, vue-router,
  h3, nitropack/*, ofetch, @unhead/vue, and @netlify/nuxt
- Fix namespace exports in configurableData.ts to satisfy knip v6 rules
- Remove stale prisma-generated-client stub no longer needed
Copilot AI review requested due to automatic review settings May 26, 2026 16:12
@coderabbitai

coderabbitai Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@RedStar071, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 39 minutes and 2 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 1be94aaf-2d8c-49c9-a6c6-321b10f52cac

📥 Commits

Reviewing files that changed from the base of the PR and between 90b15d3 and 3a1adfa.

📒 Files selected for processing (2)
  • knip.ts
  • nuxt.config.ts
📝 Walkthrough

Walkthrough

Bump knip to 6.14.2, enable strict KNIP config hints as errors, remove several framework-provided dependency ignore entries, and add test/__stubs__/prisma-generated-client.ts to ignored files. Also convert General and Selfmod namespaces to non-exported declarations with linter comments.

Changes

Knip 6 Upgrade and Configuration Alignment

Layer / File(s) Summary
Knip version upgrade and configuration tightening
package.json, knip.ts
Update knip devDependency to 6.14.2; knip.ts sets treatConfigHintsAsErrors: true, removes framework-provided ignoreDependencies entries (Vue/Nuxt/Nitro/Vite-related) and @netlify/nuxt, and adds test/__stubs__/prisma-generated-client.ts to ignoreFiles.
Type namespace export visibility adjustment
shared/types/configurableData.ts
Change General and Selfmod from export namespace to non-exported namespace, each preceded by oxlint-disable-next-line no-unused-vars to mark type-only usage.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and clearly summarizes the main changes: upgrading knip to v6 and enabling treatConfigHintsAsErrors.
Description check ✅ Passed The description is well-related to the changeset, providing context, listing specific changes, and explaining the rationale behind each modification.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/knip-config-hints-as-errors

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.

@sentry

sentry Bot commented May 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.52%. Comparing base (f7ae44f) to head (3a1adfa).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #212   +/-   ##
=======================================
  Coverage   66.52%   66.52%           
=======================================
  Files         103      103           
  Lines        2306     2306           
  Branches      472      472           
=======================================
  Hits         1534     1534           
  Misses        412      412           
  Partials      360      360           
Flag Coverage Δ
component 57.04% <ø> (ø)
unit 67.56% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
package.json 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed-hq

codspeed-hq Bot commented May 26, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 44 untouched benchmarks


Comparing chore/knip-config-hints-as-errors (3a1adfa) with main (f7ae44f)

Open in CodSpeed

Copilot AI left a comment

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.

Pull request overview

This PR upgrades the repository’s dependency analysis tooling to Knip v6, tightens CI feedback by treating config hints as errors, and removes/adjusts workarounds made obsolete by the new Knip resolver behavior.

Changes:

  • Upgraded knip to 6.14.2 and enabled treatConfigHintsAsErrors: true to surface Knip config issues as CI failures.
  • Simplified knip.ts by removing several previously-needed framework dependency ignores.
  • Updated type exports in shared/types/configurableData.ts and removed an old Prisma-generated-client test stub.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
package.json Bumps knip to v6.14.2.
pnpm-lock.yaml Lockfile updates reflecting Knip v6 and transitive dependency changes.
knip.ts Enables treatConfigHintsAsErrors and removes obsolete ignoreDependencies entries.
shared/types/configurableData.ts Adjusts namespace exports to satisfy Knip v6’s unused-export detection.
test/__stubs__/prisma-generated-client.ts Deletes the Prisma client stub used by tests (currently conflicts with existing test aliasing).
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (3)

test/stubs/prisma-generated-client.ts:1

  • This stub file is deleted, but the Vitest/Vite alias still points #server/database/generated/client to test/__stubs__/prisma-generated-client (see vite.config.ts:511). With the file removed, unit tests (and any module importing #server/database/generated/client) will fail module resolution before vi.mock() can run. Either keep this stub, or update the alias to point at a replacement module (or remove the alias if Prisma client is generated/available in test runs).
    shared/types/configurableData.ts:59
  • export namespace General was changed to a non-exported namespace General, which means General.Form is no longer part of this module’s public type exports. If anything outside this file needs to import General types, that will now be a breaking change. Also, the inline comment says it is used for type exports, but without exporting the namespace those types are not importable.
// oxlint-disable-next-line no-unused-vars --- Used for type exports only, not imported directly
namespace General {
	export interface Form {
		prefix: string;
	}
}

shared/types/configurableData.ts:109

  • export namespace Selfmod was changed to a non-exported namespace Selfmod, so Selfmod.Union is no longer exported from this module. If any other module relies on Selfmod.Union as an exported type (directly or via shared/types/index.ts), that import will now fail. If the intent is to keep these as exported types while satisfying Knip, consider keeping the namespace exported or re-exporting the relevant type under a named export type.
// oxlint-disable-next-line no-unused-vars --- Used for type exports only, not imported directly
namespace Selfmod {
	type SelfmodKeyHelper<P1 extends string[]> =
		`selfmod${Capitalize<P1[0]>}${P1[1] extends string ? Capitalize<P1[1]> : ""}${P1[2] extends string
			? Capitalize<P1[2]>
			: ""}`;

@lorypelli lorypelli 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.

needs fixes

@lorypelli

Copy link
Copy Markdown
Member

@copilot fix CI checks

Copilot AI commented May 26, 2026

Copy link
Copy Markdown
Contributor

@copilot fix CI checks

Fixed the CI failures. The knip check was failing because:

  1. @netlify/nuxt was incorrectly removed from ignoreDependencies — restored it
  2. #server/database/generated/client (Prisma generated path alias) was unresolved — added to ignoreUnresolved
  3. The test/__stubs__/prisma-generated-client.ts stub was deleted but is still referenced by vite.config.ts — restored it

The unit test job failure was unrelated (codecov upload can't find coverage/clover.xml).

Copilot AI requested a review from lorypelli May 26, 2026 16:57
- Removed "@netlify/nuxt" from ignoreDependencies
- Updated ignoreUnresolved to remove "#server/database/generated/client"
- Added comment for "test/__stubs__/prisma-generated-client.ts"
- Remove @netlify/nuxt from ignoreDependencies (knip v6 detects it as
  used via .nuxt/types/modules.d.ts generated by nuxt prepare)
- Remove test/__stubs__/prisma-generated-client.ts from ignoreFiles
  (knip v6 resolves the Vite alias and treats the stub as used)
Replace the string reference in the conditional modules spread with a
static import so knip always detects @netlify/nuxt as used, regardless
of whether CI generates .nuxt/types with or without the module.

The previous approach relying on ignoreDependencies was fragile - knip
v6 config hints depended on whether .nuxt/types/modules.d.ts referenced
the package (cache-dependent). Static import is deterministic.

@lorypelli lorypelli 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.

LGTM!

@kodiakhq kodiakhq Bot merged commit 1ba87ec into main May 27, 2026
18 checks passed
@kodiakhq kodiakhq Bot deleted the chore/knip-config-hints-as-errors branch May 27, 2026 11:17
This was referenced May 27, 2026
RedStar071 added a commit that referenced this pull request Jun 8, 2026
This PR will deploy the following changes to production
(`wolfstar.rocks`).

**Next version: `v0.7.0`** (current: `v0.6.3`)

### Features

- feat(tests): auto-generate ephemeral secrets for CI builds
(`fd3a0255`)
- feat(semantic-pr): update scopes for PR validation (`2fb7ab56`)
- feat(test-secrets): add module for auto-generating CI secrets
(`3baf470c`)

### Fixes

- fix(auth): refresh Discord OAuth tokens before API calls (#218)
(`4dd1e5cf`)
- fix(ui): serve Geist and GeistMono from local provider (#214)
(`b8f27202`)
- fix: improve release workflow and fix release-notes output (#211)
(`f7ae44fb`)
- fix(package): update node engine requirement to >=24 (`b66e0040`)
- fix(ci): resolve failing workflow checks (`face5c43`)

### Other Changes

- chore: resolve release PR #217 merge conflicts (#219) (`af83b2af`)
- chore: migrate design reference from .atlas to .claude (#216)
(`cadf476e`)
- chore: remove redundant auto-imported type imports (#213) (`be362fbc`)
- chore(deps): upgrade knip to v6 and enable treatConfigHintsAsErrors
(#212) (`1ba87ecb`)
- chore(deps): update test packages (#206) (`1187f76e`)
- chore(ci): pin playwright container image to sha256 digest (#202)
(`4eef7689`)
- chore: replace create-pr-commit skill with full create-pull-request
skill (#201) (`6874c781`)
- ci: improve release workflows and permissions (`9839e301`)
- ci: enable reuse of existing server in CI environment (`ffa2b640`)
- ci: fix browser container digest, version comment, and restore
NODE_OPTIONS/secrets (`8fae2422`)
- ci: remove NODE_OPTIONS from component and build tests (`728c7951`)
- chore: rename codecov file to use correct version (`fba616b7`)
- ci: update scopes in semantic PR workflow (`2e2fd6fe`)
- ci: remove hardcoded secrets from browser tests (`a7ddfdb0`)
- chore: rename `continuous-integration` to `ci` workflow (`0ee01169`)
- ci: simplify permissions in release PR workflow (`80c69cad`)
- ci: fix all zizmor security analysis findings (`5ebc15ee`)
- ci: update reporter configuration for CI environments (`2a6166c6`)
- ci: harden GitHub Actions workflows (`2d4600ea`)
- chore(pnpm): add minimumReleaseAge and clean up config comments
(`729fadb3`)
- chore: set package version to 0.0.0 (`afd42056`)

### Uncategorized

- revert "fix(ci): resolve failing workflow checks" (`a684d62e`)

---

> Merging this PR will:
> - Deploy to `wolfstar.rocks` via Netlify
> - Create a `v0.7.0` tag and GitHub Release
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.

4 participants