Skip to content

chore(knip): include 'knip.ts' in the root 'tsconfig.json' and remove unnecessary nullish fallback for 'optionalDependencies' - #11789

Merged
sukvvon merged 2 commits into
mainfrom
chore/tsconfig-include-knip
Oct 1, 2026
Merged

sukvvon merged 2 commits into
mainfrom
chore/tsconfig-include-knip

Conversation

@sukvvon

@sukvvon sukvvon commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

🎯 Changes

  • Add knip.ts to include in the root tsconfig.json. It only matched *.config.*, so type-aware ESLint failed to parse knip.ts with "The file was not found in any of the provided project(s)".
  • Remove the ?? {} fallback for angularQuery.optionalDependencies in knip.ts, which @typescript-eslint/no-unnecessary-condition reports once the file is type-checked. If the declaration is removed, the property access now fails instead of silently producing an empty ignore list.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested code changes locally with pnpm run test:pr, or these tests do not apply to this pull request.
  • I have followed the AI contribution policy and fully understand the code in this pull request, including any code generated with AI assistance.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • Chores
    • Updated project maintenance configuration to account for optional dependencies and include an additional configuration file. These changes do not affect app functionality.

@sukvvon sukvvon self-assigned this Oct 1, 2026
@nx-cloud

nx-cloud Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 1fede28

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 7m 17s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 36s View ↗

☁️ Nx Cloud last updated this comment at 2026-10-01 00:44:10 UTC

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: TanStack/query/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: c81a54f2-b85d-4407-a11c-c3161b7eb7c1

📥 Commits

Reviewing files that changed from the base of the PR and between b90d8ce and 1fede28.

📒 Files selected for processing (2)
  • knip.ts
  • tsconfig.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The Angular Query workspace now reads optionalDependencies without a fallback. The TypeScript project also includes knip.ts.

Changes

Knip dependency handling

Layer / File(s) Summary
Dependency list and TypeScript inclusion
knip.ts, tsconfig.json
The ignored dependency list reads optionalDependencies directly. Missing or null values now cause Object.keys to fail. The TypeScript project include pattern adds knip.ts and retains *.config.*.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Suggested reviewers: lachlancollins

Merge Risk: ⚪ Minimal · up to 1fede

This developer-tooling change reads a field supplied by the Angular Query manifest and brings knip.ts into TypeScript analysis. No merge-blocking risk is established by the supplied evidence.

Architecture Summary

Architecture risk: 🔵 Low · up to 1fede

The change affects 2 systems.

Changed systems: knip.ts, tsconfig.json

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — knip.ts (service) was modified; 1 changed file maps to changed impact.
  • observed — tsconfig.json (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in knip.ts: The Angular Query workspace no longer defaults missing or null optionalDependencies to an empty object before calling Object.keys; those cases now fail instead of producing an empty ignored-dependency list.
  • observed — Modified behavior in tsconfig.json: The TypeScript project include pattern adds knip.ts; *.config.* remains included.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies both primary changes: including knip.ts in the root tsconfig.json and removing the unnecessary optionalDependencies fallback.
Description check ✅ Passed The description explains the changes and motivation, completes all required checklist items, and identifies the change as dev-only with no release impact.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
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.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

No changeset entries found. Merging this PR will not cause a version bump for any packages.

@pkg-pr-new

pkg-pr-new Bot commented Oct 1, 2026

Copy link
Copy Markdown
More templates

@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@11789

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@11789

@tanstack/lit-query

npm i https://pkg.pr.new/@tanstack/lit-query@11789

@tanstack/preact-query

npm i https://pkg.pr.new/@tanstack/preact-query@11789

@tanstack/preact-query-devtools

npm i https://pkg.pr.new/@tanstack/preact-query-devtools@11789

@tanstack/preact-query-persist-client

npm i https://pkg.pr.new/@tanstack/preact-query-persist-client@11789

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@11789

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@11789

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@11789

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@11789

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@11789

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@11789

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@11789

@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@11789

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@11789

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@11789

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@11789

@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@11789

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@11789

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@11789

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@11789

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@11789

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@11789

@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@11789

commit: 1fede28

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 11.73 KB (0%)
react minimal 8.58 KB (0%)

@sukvvon
sukvvon merged commit d331f38 into main Oct 1, 2026
9 checks passed
@sukvvon
sukvvon deleted the chore/tsconfig-include-knip branch October 1, 2026 00:45
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.

1 participant