-
Notifications
You must be signed in to change notification settings - Fork 7
feat: improve knip configuration for better unused code detection #203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
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 adds knip as a development dependency to help identify unused code, dependencies, and exports in the codebase. Knip is a static analysis tool that can help maintain code quality by detecting dead code.
- Added knip@^5.62.0 as a development dependency
- Created a comprehensive knip.json configuration file with project-specific settings
- Configured entry points, project files, and ignore patterns for the Next.js project
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
package.json | Added knip dependency to devDependencies |
knip.json | Created configuration file with entry points, ignore patterns, and framework-specific settings |
🎨 Chromatic Visual Testing Results
Check the visual changes and approve or request changes as needed. |
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
🎨 Chromatic Visual Testing Results
Check the visual changes and approve or request changes as needed. |
🎨 Chromatic Visual Testing Results
Check the visual changes and approve or request changes as needed. |
🎨 Chromatic Visual Testing Results
Check the visual changes and approve or request changes as needed. |
let sno rebase to origin/main and solve conflicts |
Rebase and Conflict Resolution Task List✅ All tasks completed successfully!
Summary✅ Successfully rebased The PR is now up-to-date with the latest main branch and ready for review! |
🎨 Chromatic Visual Testing Results
Check the visual changes and approve or request changes as needed. |
- Added knip@^5.62.0 as development dependency - Created knip.json configuration file for project setup - This will help identify unused code, dependencies, and exports 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Update entry points to include middleware.ts and orval.config.ts - Add app directory pattern for Next.js App Router support - Update next.config reference from .mjs to .ts - Add @algolia/autocomplete-shared to ignored dependencies 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Remove next.config.ts and middleware.ts from entry points since Next.js loads them automatically - Move these files to ignore list to prevent false positive warnings - Remove @types/node from ignoreDependencies to allow proper unused detection - Add storybook plugin configuration for story file detection - Configuration now properly detects unused dependencies without false positives 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Cleaned up package.json and bun.lock by removing dependencies that are no longer used: - Removed various unused development and runtime dependencies - Updated lock file to reflect the changes - Improved project maintainability and reduced bundle size 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Summary
Changes
middleware.ts
andorval.config.ts
to entry pointsapp/**/*.{js,jsx,ts,tsx}
pattern for App Router supportnext.config.mjs
reference tonext.config.ts
@algolia/autocomplete-shared
to ignored dependencies to prevent false positivesTest plan
bun run knip
to verify configuration works correctly🤖 Generated with Claude Code