-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed as not planned
Labels
Issue - Unassigned / ActionableClear and approved. Available for contributors to pick up.Clear and approved. Available for contributors to pick up.
Description
This issue references the discussion in PR #3810 about improving our Knip configuration for the monorepo setup.
@webpro (who is the primary Knip developer) suggested the following configuration which would be more effective for our monorepo structure:
{
"$schema": "https://unpkg.com/knip@latest/schema.json",
"workspaces": {
".": {
"entry": ["src/extension.ts", "src/workers/countTokens.ts", "src/**/__tests__/**/*{b,B}enchmark.ts"],
"project": ["src/**/*.ts"]
},
"webview-ui": {
"entry": ["src/index.tsx"],
"project": ["src/**/*.{ts,tsx}"]
}
},
"ignore": ["**/__mocks__/**"]
}Key points from @webpro:
- In a monorepo, the top-level
entryandprojectoptions are not effective and should be in the root workspace config atworkspaces["."] - Using
--debugcan help see the "Included workspace configs" that Knip uses - The
ignoreoption in the config can be removed entirely after installing[email protected]or later
This configuration would help resolve issues like the one encountered with src/utils/storageUtils.ts being flagged incorrectly.
Metadata
Metadata
Assignees
Labels
Issue - Unassigned / ActionableClear and approved. Available for contributors to pick up.Clear and approved. Available for contributors to pick up.
Type
Projects
Status
Done