@knip/mcp 0.0.18 → 0.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/src/docs/blog/for-editors-and-agents.md +47 -43
- package/src/docs/blog/knip-v4.mdx +2 -2
- package/src/docs/blog/two-years.mdx +1 -1
- package/src/docs/docs/explanations/comparison-and-migration.md +4 -0
- package/src/docs/docs/explanations/plugins.md +20 -2
- package/src/docs/docs/features/auto-fix.mdx +2 -2
- package/src/docs/docs/guides/issue-reproduction.md +7 -6
- package/src/docs/docs/reference/faq.md +1 -3
- package/src/docs/explanations/comparison-and-migration.md +2 -0
- package/src/docs/explanations/plugins.md +16 -6
- package/src/docs/features/auto-fix.mdx +20 -5
- package/src/docs/features/monorepos-and-workspaces.md +19 -4
- package/src/docs/features/production-mode.md +1 -1
- package/src/docs/features/reporters.md +9 -7
- package/src/docs/guides/configuring-project-files.md +13 -13
- package/src/docs/guides/contributing.md +1 -1
- package/src/docs/guides/handling-issues.mdx +183 -121
- package/src/docs/guides/issue-reproduction.md +15 -7
- package/src/docs/guides/performance.md +19 -8
- package/src/docs/guides/troubleshooting.md +7 -10
- package/src/docs/guides/using-knip-in-ci.md +16 -20
- package/src/docs/index.mdx +3 -3
- package/src/docs/overview/configuration.md +6 -6
- package/src/docs/overview/features.md +5 -5
- package/src/docs/overview/getting-started.mdx +15 -5
- package/src/docs/reference/cli.md +269 -243
- package/src/docs/reference/configuration-hints.md +146 -0
- package/src/docs/reference/configuration.md +24 -7
- package/src/docs/reference/faq.md +28 -39
- package/src/docs/reference/integrations.md +105 -0
- package/src/docs/reference/known-issues.md +43 -21
- package/src/docs/reference/plugins.md +9 -1
- package/src/docs/reference/related-tooling.md +3 -3
- package/src/docs/sponsors.mdx +3 -4
- package/src/docs/typescript/unused-exports.md +1 -1
- package/src/docs/writing-a-plugin/index.md +16 -3
- package/src/tools.js +3 -9
- package/src/docs/docs/reference/plugins/angular.md +0 -33
- package/src/docs/docs/reference/plugins/astro-db.md +0 -34
- package/src/docs/docs/reference/plugins/astro-og-canvas.md +0 -13
- package/src/docs/docs/reference/plugins/astro.md +0 -43
- package/src/docs/docs/reference/plugins/ava.md +0 -46
- package/src/docs/docs/reference/plugins/babel.md +0 -38
- package/src/docs/docs/reference/plugins/biome.md +0 -34
- package/src/docs/docs/reference/plugins/bumpp.md +0 -38
- package/src/docs/docs/reference/plugins/bun.md +0 -13
- package/src/docs/docs/reference/plugins/c8.md +0 -26
- package/src/docs/docs/reference/plugins/capacitor.md +0 -35
- package/src/docs/docs/reference/plugins/changelogen.md +0 -38
- package/src/docs/docs/reference/plugins/changelogithub.md +0 -38
- package/src/docs/docs/reference/plugins/changesets.md +0 -33
- package/src/docs/docs/reference/plugins/commitizen.md +0 -35
- package/src/docs/docs/reference/plugins/commitlint.md +0 -39
- package/src/docs/docs/reference/plugins/convex.md +0 -34
- package/src/docs/docs/reference/plugins/create-typescript-app.md +0 -33
- package/src/docs/docs/reference/plugins/cspell.md +0 -36
- package/src/docs/docs/reference/plugins/cucumber.md +0 -36
- package/src/docs/docs/reference/plugins/cypress.md +0 -40
- package/src/docs/docs/reference/plugins/danger.md +0 -33
- package/src/docs/docs/reference/plugins/dependency-cruiser.md +0 -44
- package/src/docs/docs/reference/plugins/docusaurus.md +0 -39
- package/src/docs/docs/reference/plugins/dotenv.md +0 -24
- package/src/docs/docs/reference/plugins/drizzle.md +0 -33
- package/src/docs/docs/reference/plugins/eleventy.md +0 -38
- package/src/docs/docs/reference/plugins/eslint.md +0 -74
- package/src/docs/docs/reference/plugins/expo.md +0 -38
- package/src/docs/docs/reference/plugins/expressive-code.md +0 -39
- package/src/docs/docs/reference/plugins/gatsby.md +0 -46
- package/src/docs/docs/reference/plugins/github-action.md +0 -33
- package/src/docs/docs/reference/plugins/github-actions.md +0 -34
- package/src/docs/docs/reference/plugins/glob.md +0 -26
- package/src/docs/docs/reference/plugins/graphql-codegen.md +0 -43
- package/src/docs/docs/reference/plugins/hardhat.md +0 -33
- package/src/docs/docs/reference/plugins/husky.md +0 -37
- package/src/docs/docs/reference/plugins/i18next-parser.md +0 -44
- package/src/docs/docs/reference/plugins/jest.md +0 -50
- package/src/docs/docs/reference/plugins/karma.md +0 -36
- package/src/docs/docs/reference/plugins/knex.md +0 -33
- package/src/docs/docs/reference/plugins/ladle.md +0 -40
- package/src/docs/docs/reference/plugins/lefthook.md +0 -43
- package/src/docs/docs/reference/plugins/lint-staged.md +0 -45
- package/src/docs/docs/reference/plugins/linthtml.md +0 -38
- package/src/docs/docs/reference/plugins/lockfile-lint.md +0 -38
- package/src/docs/docs/reference/plugins/lost-pixel.md +0 -33
- package/src/docs/docs/reference/plugins/markdownlint.md +0 -34
- package/src/docs/docs/reference/plugins/mdx.md +0 -37
- package/src/docs/docs/reference/plugins/mdxlint.md +0 -35
- package/src/docs/docs/reference/plugins/metro.md +0 -46
- package/src/docs/docs/reference/plugins/mocha.md +0 -48
- package/src/docs/docs/reference/plugins/moonrepo.md +0 -35
- package/src/docs/docs/reference/plugins/msw.md +0 -36
- package/src/docs/docs/reference/plugins/nano-staged.md +0 -36
- package/src/docs/docs/reference/plugins/nest.md +0 -38
- package/src/docs/docs/reference/plugins/netlify.md +0 -42
- package/src/docs/docs/reference/plugins/next-intl.md +0 -33
- package/src/docs/docs/reference/plugins/next-mdx.md +0 -36
- package/src/docs/docs/reference/plugins/next.md +0 -53
- package/src/docs/docs/reference/plugins/nitro.md +0 -50
- package/src/docs/docs/reference/plugins/node-modules-inspector.md +0 -45
- package/src/docs/docs/reference/plugins/node.md +0 -48
- package/src/docs/docs/reference/plugins/nodemon.md +0 -27
- package/src/docs/docs/reference/plugins/npm-package-json-lint.md +0 -38
- package/src/docs/docs/reference/plugins/nuxt.md +0 -49
- package/src/docs/docs/reference/plugins/nx.md +0 -57
- package/src/docs/docs/reference/plugins/nyc.md +0 -36
- package/src/docs/docs/reference/plugins/oclif.md +0 -33
- package/src/docs/docs/reference/plugins/oxlint.md +0 -44
- package/src/docs/docs/reference/plugins/parcel.md +0 -37
- package/src/docs/docs/reference/plugins/playwright-ct.md +0 -39
- package/src/docs/docs/reference/plugins/playwright-test.md +0 -26
- package/src/docs/docs/reference/plugins/playwright.md +0 -49
- package/src/docs/docs/reference/plugins/plop.md +0 -33
- package/src/docs/docs/reference/plugins/pnpm.md +0 -33
- package/src/docs/docs/reference/plugins/postcss.md +0 -43
- package/src/docs/docs/reference/plugins/preconstruct.md +0 -33
- package/src/docs/docs/reference/plugins/prettier.md +0 -36
- package/src/docs/docs/reference/plugins/prisma.md +0 -55
- package/src/docs/docs/reference/plugins/react-cosmos.md +0 -39
- package/src/docs/docs/reference/plugins/react-router.md +0 -34
- package/src/docs/docs/reference/plugins/relay.md +0 -52
- package/src/docs/docs/reference/plugins/release-it.md +0 -34
- package/src/docs/docs/reference/plugins/remark.md +0 -37
- package/src/docs/docs/reference/plugins/remix.md +0 -40
- package/src/docs/docs/reference/plugins/rollup.md +0 -47
- package/src/docs/docs/reference/plugins/rsbuild.md +0 -33
- package/src/docs/docs/reference/plugins/rslib.md +0 -33
- package/src/docs/docs/reference/plugins/rspack.md +0 -33
- package/src/docs/docs/reference/plugins/rstest.md +0 -33
- package/src/docs/docs/reference/plugins/semantic-release.md +0 -38
- package/src/docs/docs/reference/plugins/sentry.md +0 -35
- package/src/docs/docs/reference/plugins/simple-git-hooks.md +0 -35
- package/src/docs/docs/reference/plugins/size-limit.md +0 -35
- package/src/docs/docs/reference/plugins/sst.md +0 -33
- package/src/docs/docs/reference/plugins/starlight.md +0 -33
- package/src/docs/docs/reference/plugins/storybook.md +0 -44
- package/src/docs/docs/reference/plugins/stryker.md +0 -33
- package/src/docs/docs/reference/plugins/stylelint.md +0 -38
- package/src/docs/docs/reference/plugins/svelte.md +0 -34
- package/src/docs/docs/reference/plugins/sveltekit.md +0 -33
- package/src/docs/docs/reference/plugins/svgo.md +0 -37
- package/src/docs/docs/reference/plugins/svgr.md +0 -40
- package/src/docs/docs/reference/plugins/swc.md +0 -33
- package/src/docs/docs/reference/plugins/syncpack.md +0 -38
- package/src/docs/docs/reference/plugins/tailwind.md +0 -33
- package/src/docs/docs/reference/plugins/tanstack-router.md +0 -48
- package/src/docs/docs/reference/plugins/taskfile.md +0 -40
- package/src/docs/docs/reference/plugins/travis.md +0 -33
- package/src/docs/docs/reference/plugins/ts-node.md +0 -27
- package/src/docs/docs/reference/plugins/tsdown.md +0 -45
- package/src/docs/docs/reference/plugins/tsup.md +0 -45
- package/src/docs/docs/reference/plugins/tsx.md +0 -46
- package/src/docs/docs/reference/plugins/typedoc.md +0 -49
- package/src/docs/docs/reference/plugins/typescript.md +0 -50
- package/src/docs/docs/reference/plugins/unbuild.md +0 -33
- package/src/docs/docs/reference/plugins/unocss.md +0 -36
- package/src/docs/docs/reference/plugins/vercel-og.md +0 -38
- package/src/docs/docs/reference/plugins/vike.md +0 -34
- package/src/docs/docs/reference/plugins/vite.md +0 -48
- package/src/docs/docs/reference/plugins/vitepress.md +0 -34
- package/src/docs/docs/reference/plugins/vitest.md +0 -50
- package/src/docs/docs/reference/plugins/vue.md +0 -33
- package/src/docs/docs/reference/plugins/webdriver-io.md +0 -33
- package/src/docs/docs/reference/plugins/webpack.md +0 -48
- package/src/docs/docs/reference/plugins/wireit.md +0 -33
- package/src/docs/docs/reference/plugins/wrangler.md +0 -33
- package/src/docs/docs/reference/plugins/xo.md +0 -40
- package/src/docs/docs/reference/plugins/yarn.md +0 -33
- package/src/docs/docs/reference/plugins/yorkie.md +0 -33
- package/src/docs/reference/plugins/angular.md +0 -33
- package/src/docs/reference/plugins/astro-db.md +0 -34
- package/src/docs/reference/plugins/astro.md +0 -43
- package/src/docs/reference/plugins/ava.md +0 -46
- package/src/docs/reference/plugins/babel.md +0 -38
- package/src/docs/reference/plugins/biome.md +0 -34
- package/src/docs/reference/plugins/bumpp.md +0 -38
- package/src/docs/reference/plugins/bun.md +0 -33
- package/src/docs/reference/plugins/c8.md +0 -26
- package/src/docs/reference/plugins/capacitor.md +0 -35
- package/src/docs/reference/plugins/changelogen.md +0 -38
- package/src/docs/reference/plugins/changelogithub.md +0 -38
- package/src/docs/reference/plugins/changesets.md +0 -33
- package/src/docs/reference/plugins/commitizen.md +0 -35
- package/src/docs/reference/plugins/commitlint.md +0 -39
- package/src/docs/reference/plugins/convex.md +0 -34
- package/src/docs/reference/plugins/create-typescript-app.md +0 -33
- package/src/docs/reference/plugins/cspell.md +0 -36
- package/src/docs/reference/plugins/cucumber.md +0 -36
- package/src/docs/reference/plugins/cypress.md +0 -40
- package/src/docs/reference/plugins/danger.md +0 -33
- package/src/docs/reference/plugins/dependency-cruiser.md +0 -44
- package/src/docs/reference/plugins/docusaurus.md +0 -39
- package/src/docs/reference/plugins/dotenv.md +0 -24
- package/src/docs/reference/plugins/drizzle.md +0 -33
- package/src/docs/reference/plugins/eleventy.md +0 -38
- package/src/docs/reference/plugins/eslint.md +0 -74
- package/src/docs/reference/plugins/expo.md +0 -38
- package/src/docs/reference/plugins/gatsby.md +0 -46
- package/src/docs/reference/plugins/github-action.md +0 -33
- package/src/docs/reference/plugins/github-actions.md +0 -34
- package/src/docs/reference/plugins/glob.md +0 -26
- package/src/docs/reference/plugins/graphql-codegen.md +0 -43
- package/src/docs/reference/plugins/hardhat.md +0 -33
- package/src/docs/reference/plugins/husky.md +0 -37
- package/src/docs/reference/plugins/i18next-parser.md +0 -44
- package/src/docs/reference/plugins/jest.md +0 -50
- package/src/docs/reference/plugins/karma.md +0 -36
- package/src/docs/reference/plugins/ladle.md +0 -40
- package/src/docs/reference/plugins/lefthook.md +0 -43
- package/src/docs/reference/plugins/lint-staged.md +0 -45
- package/src/docs/reference/plugins/linthtml.md +0 -38
- package/src/docs/reference/plugins/lockfile-lint.md +0 -38
- package/src/docs/reference/plugins/lost-pixel.md +0 -33
- package/src/docs/reference/plugins/markdownlint.md +0 -34
- package/src/docs/reference/plugins/mdx.md +0 -37
- package/src/docs/reference/plugins/mdxlint.md +0 -35
- package/src/docs/reference/plugins/metro.md +0 -46
- package/src/docs/reference/plugins/mocha.md +0 -48
- package/src/docs/reference/plugins/moonrepo.md +0 -35
- package/src/docs/reference/plugins/msw.md +0 -36
- package/src/docs/reference/plugins/nano-staged.md +0 -36
- package/src/docs/reference/plugins/nest.md +0 -38
- package/src/docs/reference/plugins/netlify.md +0 -42
- package/src/docs/reference/plugins/next-intl.md +0 -33
- package/src/docs/reference/plugins/next-mdx.md +0 -36
- package/src/docs/reference/plugins/next.md +0 -53
- package/src/docs/reference/plugins/node-modules-inspector.md +0 -45
- package/src/docs/reference/plugins/node.md +0 -48
- package/src/docs/reference/plugins/nodemon.md +0 -27
- package/src/docs/reference/plugins/npm-package-json-lint.md +0 -38
- package/src/docs/reference/plugins/nuxt.md +0 -49
- package/src/docs/reference/plugins/nx.md +0 -57
- package/src/docs/reference/plugins/nyc.md +0 -36
- package/src/docs/reference/plugins/oclif.md +0 -33
- package/src/docs/reference/plugins/oxlint.md +0 -44
- package/src/docs/reference/plugins/playwright-ct.md +0 -39
- package/src/docs/reference/plugins/playwright-test.md +0 -26
- package/src/docs/reference/plugins/playwright.md +0 -49
- package/src/docs/reference/plugins/plop.md +0 -33
- package/src/docs/reference/plugins/pnpm.md +0 -33
- package/src/docs/reference/plugins/postcss.md +0 -43
- package/src/docs/reference/plugins/preconstruct.md +0 -33
- package/src/docs/reference/plugins/prettier.md +0 -36
- package/src/docs/reference/plugins/prisma.md +0 -55
- package/src/docs/reference/plugins/react-cosmos.md +0 -39
- package/src/docs/reference/plugins/react-router.md +0 -34
- package/src/docs/reference/plugins/relay.md +0 -52
- package/src/docs/reference/plugins/release-it.md +0 -34
- package/src/docs/reference/plugins/remark.md +0 -37
- package/src/docs/reference/plugins/remix.md +0 -40
- package/src/docs/reference/plugins/rollup.md +0 -47
- package/src/docs/reference/plugins/rsbuild.md +0 -33
- package/src/docs/reference/plugins/rslib.md +0 -33
- package/src/docs/reference/plugins/rspack.md +0 -33
- package/src/docs/reference/plugins/rstest.md +0 -33
- package/src/docs/reference/plugins/semantic-release.md +0 -38
- package/src/docs/reference/plugins/sentry.md +0 -35
- package/src/docs/reference/plugins/simple-git-hooks.md +0 -35
- package/src/docs/reference/plugins/size-limit.md +0 -36
- package/src/docs/reference/plugins/sst.md +0 -33
- package/src/docs/reference/plugins/starlight.md +0 -33
- package/src/docs/reference/plugins/storybook.md +0 -44
- package/src/docs/reference/plugins/stryker.md +0 -33
- package/src/docs/reference/plugins/stylelint.md +0 -38
- package/src/docs/reference/plugins/svelte.md +0 -37
- package/src/docs/reference/plugins/svgo.md +0 -37
- package/src/docs/reference/plugins/svgr.md +0 -40
- package/src/docs/reference/plugins/swc.md +0 -33
- package/src/docs/reference/plugins/syncpack.md +0 -38
- package/src/docs/reference/plugins/tailwind.md +0 -33
- package/src/docs/reference/plugins/taskfile.md +0 -34
- package/src/docs/reference/plugins/travis.md +0 -33
- package/src/docs/reference/plugins/ts-node.md +0 -27
- package/src/docs/reference/plugins/tsdown.md +0 -45
- package/src/docs/reference/plugins/tsup.md +0 -45
- package/src/docs/reference/plugins/tsx.md +0 -46
- package/src/docs/reference/plugins/typedoc.md +0 -49
- package/src/docs/reference/plugins/typescript.md +0 -50
- package/src/docs/reference/plugins/unbuild.md +0 -33
- package/src/docs/reference/plugins/unocss.md +0 -36
- package/src/docs/reference/plugins/vercel-og.md +0 -38
- package/src/docs/reference/plugins/vike.md +0 -34
- package/src/docs/reference/plugins/vite.md +0 -48
- package/src/docs/reference/plugins/vitest.md +0 -50
- package/src/docs/reference/plugins/vue.md +0 -33
- package/src/docs/reference/plugins/webdriver-io.md +0 -33
- package/src/docs/reference/plugins/webpack.md +0 -48
- package/src/docs/reference/plugins/wireit.md +0 -33
- package/src/docs/reference/plugins/wrangler.md +0 -33
- package/src/docs/reference/plugins/xo.md +0 -40
- package/src/docs/reference/plugins/yarn.md +0 -33
- package/src/docs/reference/plugins/yorkie.md +0 -33
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Configuration Hints
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Knip emits configuration hints to help keep your configuration file tidy and
|
|
6
|
+
reduce drift.
|
|
7
|
+
|
|
8
|
+
They're warnings by default, not lint findings. But addressing the hints might
|
|
9
|
+
improve results significantly. The hints on this page are sorted by
|
|
10
|
+
impact/importance (most impactful first).
|
|
11
|
+
|
|
12
|
+
Use [`--treat-config-hints-as-errors`][1] or [`treatConfigHintsAsErrors`][2] to
|
|
13
|
+
make any configuration hint result in a non-zero exit code and fail CI.
|
|
14
|
+
|
|
15
|
+
## Unconfigured projects
|
|
16
|
+
|
|
17
|
+
Too many unused files in a single workspace-codebase, caused by a missing
|
|
18
|
+
configuration file or incomplete configuration:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
Create knip.json configuration file, and add entry and/or refine project files (42 unused files)
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Or if you have a config file:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
Add entry and/or refine project files (42 unused files)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**Solution**: Add and refine `entry` and/or `project` patterns.
|
|
31
|
+
|
|
32
|
+
Related resources:
|
|
33
|
+
|
|
34
|
+
- [Configuration][3]
|
|
35
|
+
- [Monorepos & Workspaces][4]
|
|
36
|
+
|
|
37
|
+
## Unconfigured workspaces
|
|
38
|
+
|
|
39
|
+
Too many unused files in a monorepo, caused by a missing configuration file or
|
|
40
|
+
incomplete configuration:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
Create knip.json configuration file with workspaces["packages/app"] object (42 unused files)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Or if you have a config file:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
Add entry and/or refine project files in workspaces["packages/app"] (42 unused files)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Solution**: add a `workspaces` object to configuration. Add and refine `entry`
|
|
53
|
+
and/or `project` patterns. For instance, the example message translates to
|
|
54
|
+
configuration like this:
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"workspaces" {
|
|
59
|
+
"packages/app": {
|
|
60
|
+
"entry": ["src/App.tsx"],
|
|
61
|
+
"project": ["src/**/*.ts"]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Related resources:
|
|
68
|
+
|
|
69
|
+
- [Configuring Project Files][5]
|
|
70
|
+
- [Monorepos & Workspaces][4]
|
|
71
|
+
|
|
72
|
+
## Top-level entry/project
|
|
73
|
+
|
|
74
|
+
In monorepos, Knip uses only `entry` and `project` under `workspaces`. The
|
|
75
|
+
top-level keys with the same name are ignored.
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
Remove, or move unused top-level entry to one of "workspaces"
|
|
79
|
+
Remove, or move unused top-level project to one of "workspaces"
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**Solution**: Remove top-level `entry` and `project` keys, use these options in
|
|
83
|
+
`workspaces` instead.
|
|
84
|
+
|
|
85
|
+
```jsonc
|
|
86
|
+
{
|
|
87
|
+
"entry": ["src/App.tsx"], // move entry/project from here... ↴
|
|
88
|
+
"project": ["src/**/*.ts"],
|
|
89
|
+
"workspaces": {
|
|
90
|
+
".": {
|
|
91
|
+
"entry": ["src/App.tsx"], // ...to the correct workspace(s) ↲
|
|
92
|
+
"project": ["src/**/*.ts"],
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Unused entry in ignore group
|
|
99
|
+
|
|
100
|
+
An entry of an ignore list is no longer needed, remove it.
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
Remove from ignoreWorkspaces
|
|
104
|
+
Remove from ignoreDependencies
|
|
105
|
+
Remove from ignoreBinaries
|
|
106
|
+
Remove from ignoreUnresolved
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Solution**: Remove the entry from the array.
|
|
110
|
+
|
|
111
|
+
## Useless patterns
|
|
112
|
+
|
|
113
|
+
A glob pattern in `entry` or `project` does not match any files.
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
Refine entry pattern (no matches)
|
|
117
|
+
Refine project pattern (no matches)
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Solution**: Refine or remove the `entry` or `project` entry.
|
|
121
|
+
|
|
122
|
+
## Redundant patterns
|
|
123
|
+
|
|
124
|
+
A glob/pattern is redundant, because it's already covered by defaults or added
|
|
125
|
+
by an enabled plugin.
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
Remove redundant entry pattern
|
|
129
|
+
Remove redundant project pattern
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**Solution**: Remove the `entry` or `project` entry.
|
|
133
|
+
|
|
134
|
+
## Missing package entry file
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
Package entry file not found
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Solution**: Refine or remove the entry in `package.json`.
|
|
141
|
+
|
|
142
|
+
[1]: ./cli.md#--treat-config-hints-as-errors
|
|
143
|
+
[2]: ./configuration.md#treatconfighintsaserrors
|
|
144
|
+
[3]: ../overview/configuration.md
|
|
145
|
+
[4]: ../features/monorepos-and-workspaces.md
|
|
146
|
+
[5]: ../guides/configuring-project-files.md
|
|
@@ -180,6 +180,13 @@ notation below is valid and will report only exports tagged `@lintignore` or
|
|
|
180
180
|
}
|
|
181
181
|
```
|
|
182
182
|
|
|
183
|
+
:::caution
|
|
184
|
+
|
|
185
|
+
Tags must not contain hyphens or plus symbols, so it is recommended to stick to
|
|
186
|
+
letters and avoid snake-case.
|
|
187
|
+
|
|
188
|
+
:::
|
|
189
|
+
|
|
183
190
|
Also see [JSDoc & TSDoc Tags][8].
|
|
184
191
|
|
|
185
192
|
### `treatConfigHintsAsErrors`
|
|
@@ -198,17 +205,23 @@ Exit with non-zero code (1) if there are any configuration hints.
|
|
|
198
205
|
|
|
199
206
|
:::tip
|
|
200
207
|
|
|
201
|
-
Please read [configuring project files][9] before using the `ignore` option
|
|
202
|
-
because in most cases you'll want to fine‑tune `entry` and `project` (or use
|
|
203
|
-
production mode) instead.
|
|
208
|
+
Please read [configuring project files][9] before using the `ignore` option.
|
|
204
209
|
|
|
205
210
|
:::
|
|
206
211
|
|
|
207
|
-
|
|
212
|
+
Avoid `ignore` patterns. There is almost always a better solution:
|
|
213
|
+
|
|
214
|
+
- Follow up on configuration hints (if there are any).
|
|
215
|
+
- Fine-tune `entry` and `project` patterns.
|
|
216
|
+
- Use [production mode][10].
|
|
217
|
+
- Other `ignore*` options.
|
|
218
|
+
|
|
219
|
+
**NOTE**: An exception to the rule: to _temporarily_ report only issues in files
|
|
220
|
+
that match the negated `ignore` pattern:
|
|
208
221
|
|
|
209
222
|
```json title="knip.json"
|
|
210
223
|
{
|
|
211
|
-
"ignore": ["src/
|
|
224
|
+
"ignore": ["!src/dir/**"]
|
|
212
225
|
}
|
|
213
226
|
```
|
|
214
227
|
|
|
@@ -271,6 +284,8 @@ export default {
|
|
|
271
284
|
|
|
272
285
|
Suffix an item with `!` to enable it only in production mode.
|
|
273
286
|
|
|
287
|
+
Also see [Unused dependencies][11].
|
|
288
|
+
|
|
274
289
|
### `ignoreMembers`
|
|
275
290
|
|
|
276
291
|
Array of class and enum members to exclude from the report. Regular expressions
|
|
@@ -399,7 +414,7 @@ files (`.js` or `.ts`), not in JSON configuration files.
|
|
|
399
414
|
|
|
400
415
|
Override built-in compilers or add custom compilers for additional file types.
|
|
401
416
|
|
|
402
|
-
Also see [Compilers][
|
|
417
|
+
Also see [Compilers][12].
|
|
403
418
|
|
|
404
419
|
[1]: ../reference/dynamic-configuration.mdx
|
|
405
420
|
[2]: ../overview/configuration.md
|
|
@@ -410,4 +425,6 @@ Also see [Compilers][10].
|
|
|
410
425
|
[7]: ../features/rules-and-filters.md#filters
|
|
411
426
|
[8]: ./jsdoc-tsdoc-tags.md
|
|
412
427
|
[9]: ../guides/configuring-project-files.md
|
|
413
|
-
[10]: ../features/
|
|
428
|
+
[10]: ../features/production-mode.md
|
|
429
|
+
[11]: ../guides/handling-issues.mdx#unused-dependencies
|
|
430
|
+
[12]: ../features/compilers.md
|
|
@@ -38,26 +38,24 @@ File-oriented linters like ESLint are complementary to Knip.
|
|
|
38
38
|
### Isn't tree-shaking enough?
|
|
39
39
|
|
|
40
40
|
In short: no. They share an important goal: improve UX by removing unused code.
|
|
41
|
-
|
|
42
|
-
complementary tools.
|
|
41
|
+
But tree-shaking and Knip are different and complementary tools.
|
|
43
42
|
|
|
44
43
|
Tree-shaking is a build or compile-time activity to reduce production bundle
|
|
45
44
|
size. It typically operates on bundled production code, which might include
|
|
46
|
-
external/third-party code.
|
|
47
|
-
hands".
|
|
45
|
+
external/third-party code. A build time optimization and "out of your hands".
|
|
48
46
|
|
|
49
|
-
On the other hand, Knip is a project linter that should be part of the
|
|
50
|
-
It lints, reports and fixes only your own source code.
|
|
51
|
-
with other linters, focuses on inter-file dependencies, so
|
|
52
|
-
file may not be caught by Knip.
|
|
47
|
+
On the other hand, Knip is a project linter that should be part of the
|
|
48
|
+
development and QA phase. It lints, reports and fixes only your own source code.
|
|
49
|
+
Moreover, in contrast with other linters, focuses on inter-file dependencies, so
|
|
50
|
+
dead code within a file may not be caught by Knip.
|
|
53
51
|
|
|
54
|
-
Issues reported by the linter are
|
|
55
|
-
that Knip [auto-fixes][1] for you).
|
|
52
|
+
Issues reported by the linter are for you to handle and review.
|
|
56
53
|
|
|
57
54
|
Besides those differences, Knip has a broader scope:
|
|
58
55
|
|
|
59
|
-
- Improve DX (see [less is more][
|
|
60
|
-
-
|
|
56
|
+
- Improve DX (see [less is more][1]).
|
|
57
|
+
- Unless using [production mode][2], also lint all source code like tests,
|
|
58
|
+
scripts and Storybook stories.
|
|
61
59
|
- Handle more [types of issues][3] (such as unlisted dependencies).
|
|
62
60
|
|
|
63
61
|
## Synergy
|
|
@@ -306,28 +304,25 @@ dependencies, the [`--include-libs ` flag][4] will trigger the same.
|
|
|
306
304
|
|
|
307
305
|
Projects can use `compilerOptions.paths` to alias paths in other workspaces in
|
|
308
306
|
the same monorepo. Knip doesn't understand those paths might represent internal
|
|
309
|
-
workspaces and might report false positives.
|
|
310
|
-
complicated, but a major reason is that Knip does it's job based on the
|
|
311
|
-
workspace graph, while [workspaces are different from TypeScript programs][11]
|
|
312
|
-
and [the workspace graph doesn't match TypeScript project structure][12].
|
|
307
|
+
workspaces and might report false positives.
|
|
313
308
|
|
|
314
309
|
The recommendation and best practice is to list such workspaces/dependencies in
|
|
315
310
|
`package.json`, and import them as such. Other tooling should not have any
|
|
316
311
|
issues with this standard approach either.
|
|
317
312
|
|
|
318
|
-
Also see the example in [TypeScript path aliases in monorepos][
|
|
313
|
+
Also see the example in [TypeScript path aliases in monorepos][11].
|
|
319
314
|
|
|
320
315
|
### What's up with that configurable `tsconfig.json` location?
|
|
321
316
|
|
|
322
317
|
There's a difference between `--tsConfig [file]` as a CLI argument and the
|
|
323
318
|
`typescript.config` option in Knip configuration.
|
|
324
319
|
|
|
325
|
-
The [`--tsConfig [file]` option][
|
|
320
|
+
The [`--tsConfig [file]` option][12] is used to provide an alternative location
|
|
326
321
|
for the default root `tsconfig.json` file. Relevant `compilerOptions` include
|
|
327
322
|
`paths` and `moduleResolution`. This setting is only available at the root
|
|
328
323
|
level.
|
|
329
324
|
|
|
330
|
-
On the other hand, the [`config` option of the plugin][
|
|
325
|
+
On the other hand, the [`config` option of the plugin][13] can be set per
|
|
331
326
|
workspace. The TypeScript plugin extracts referenced external dependencies such
|
|
332
327
|
as those in `extends`, `compilerOptions.types` and JSX settings:
|
|
333
328
|
|
|
@@ -351,7 +346,7 @@ From this example, Knip can determine whether the `@tsconfig/node20` and
|
|
|
351
346
|
for `tsconfig.json` can be set per workspace.
|
|
352
347
|
- In case path aliases from `compilerOptions.paths` aren't picked up by Knip,
|
|
353
348
|
either use `--tsConfig [file]` to target a different `tsconfig.json`, or
|
|
354
|
-
manually add [paths][
|
|
349
|
+
manually add [paths][14] to the Knip configuration. The latter can be done per
|
|
355
350
|
workspace.
|
|
356
351
|
|
|
357
352
|
## Compilers
|
|
@@ -374,7 +369,7 @@ other file types.
|
|
|
374
369
|
Knip comes with basic "compilers" for a few common non-standard file types.
|
|
375
370
|
They're not actual compilers, they're regular expressions only to extract import
|
|
376
371
|
statements. Override the built-in Vue "compiler" with the real one in your
|
|
377
|
-
project. Also see the answer to the previous question and [Compilers][
|
|
372
|
+
project. Also see the answer to the previous question and [Compilers][15].
|
|
378
373
|
|
|
379
374
|
## Miscellaneous
|
|
380
375
|
|
|
@@ -394,7 +389,7 @@ Which mode should've been the default? They both have their merits:
|
|
|
394
389
|
tooling, including most issues found in production mode. This mode has the
|
|
395
390
|
most impact on DX, for the same reason.
|
|
396
391
|
|
|
397
|
-
Also see [production mode][
|
|
392
|
+
Also see [production mode][2].
|
|
398
393
|
|
|
399
394
|
### Why doesn't Knip have...?
|
|
400
395
|
|
|
@@ -408,34 +403,28 @@ Examples of features that have been requested include:
|
|
|
408
403
|
- Unused object members (and e.g. React component props)
|
|
409
404
|
- Unused object props in function return values
|
|
410
405
|
- Analyze workspaces in parallel
|
|
411
|
-
- Plugins for editors like VS Code and WebStorm (LSP-based?)
|
|
412
406
|
- Support Deno
|
|
413
407
|
- Improve internal code structures and accessibility to support contributions
|
|
414
|
-
- One-shot dead code removal (more comprehensive removal of unused variables,
|
|
415
|
-
duplicate exports, dead code, etc).
|
|
416
408
|
- Replace dependencies for better performance and correctness, such as for shell
|
|
417
|
-
script parsing
|
|
409
|
+
script parsing and globbing with "unignores".
|
|
418
410
|
|
|
419
411
|
These are all interesting ideas, but most increase the API surface area, and all
|
|
420
412
|
require more development efforts and maintenance. Time is limited and
|
|
421
|
-
[sponsorships][
|
|
413
|
+
[sponsorships][16] currently don't cover - this can change though!
|
|
422
414
|
|
|
423
|
-
[1]: ../
|
|
424
|
-
[2]: ../
|
|
415
|
+
[1]: ../explanations/why-use-knip.md#less-is-more
|
|
416
|
+
[2]: ../features/production-mode.md
|
|
425
417
|
[3]: ./issue-types.md
|
|
426
418
|
[4]: ../guides/handling-issues.mdx#external-libraries
|
|
427
419
|
[5]: ../explanations/why-use-knip.md#comprehensive
|
|
428
420
|
[6]: #module-resolution
|
|
429
421
|
[7]: ../features/script-parser.md
|
|
430
|
-
[8]: ../guides/handling-issues.mdx#
|
|
422
|
+
[8]: ../guides/handling-issues.mdx#type-definition-packages
|
|
431
423
|
[9]: https://oxc.rs/docs/guide/usage/resolver.html
|
|
432
424
|
[10]: ../guides/performance.md#workspace-sharing
|
|
433
|
-
[11]: #
|
|
434
|
-
[12]:
|
|
435
|
-
[13]: ../
|
|
436
|
-
[14]: ../reference/
|
|
437
|
-
[15]: ../
|
|
438
|
-
[16]:
|
|
439
|
-
[17]: ../features/compilers.md
|
|
440
|
-
[18]: ../features/production-mode.md
|
|
441
|
-
[19]: /sponsors
|
|
425
|
+
[11]: ../guides/handling-issues.mdx#typescript-path-aliases-in-monorepos
|
|
426
|
+
[12]: ../reference/cli.md#--tsconfig-file
|
|
427
|
+
[13]: ../explanations/plugins.md#configuration-files
|
|
428
|
+
[14]: ../reference/configuration.md#paths
|
|
429
|
+
[15]: ../features/compilers.md
|
|
430
|
+
[16]: /sponsors
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Integrations
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
- [VS Code/VSX Extension][1]
|
|
6
|
+
- [JetBrains Plugin][2]
|
|
7
|
+
- [MCP Server][3]
|
|
8
|
+
- [Language Server][4]
|
|
9
|
+
|
|
10
|
+
## VS Code Extension
|
|
11
|
+
|
|
12
|
+
The official VS Code extension provides a rich integration with the [Knip
|
|
13
|
+
Language Server][4]:
|
|
14
|
+
|
|
15
|
+
- **Diagnostics**: Inline warnings for unused dependencies, exports and files
|
|
16
|
+
- **Hover Information**: Hover over exports to see import and usage locations
|
|
17
|
+
- **Imports Tree View**: Direct links to implementations
|
|
18
|
+
- **Exports Tree View**: Direct links to import and usage locations
|
|
19
|
+
- **Contention Detection**: Warnings for circular dependencies, conflicts and
|
|
20
|
+
branched import chains
|
|
21
|
+
- **Built-in MCP Server**: Automated configuration support for coding agents
|
|
22
|
+
|
|
23
|
+
Find [Knip on the VS Code Marketplace][5] and find [Knip in the Open VSX
|
|
24
|
+
Registry][6].
|
|
25
|
+
|
|
26
|
+
See below for [screenshots][7].
|
|
27
|
+
|
|
28
|
+
## JetBrains Plugin
|
|
29
|
+
|
|
30
|
+
A community plugin is available for JetBrains IDEs including WebStorm, IntelliJ
|
|
31
|
+
IDEA, and others. The plugin is powered by the [Knip Language Server][4] and
|
|
32
|
+
provides diagnostics. Find [Knip on the JetBrains Marketplace][8].
|
|
33
|
+
|
|
34
|
+
## MCP Server
|
|
35
|
+
|
|
36
|
+
The standalone MCP Server enables coding agents to configure Knip automatically.
|
|
37
|
+
Tell your agent to "configure knip" and it will use the available tools to
|
|
38
|
+
create, analyze and optimize your `knip.json` configuration.
|
|
39
|
+
|
|
40
|
+
The [Knip MCP Server][9] is available separately and built into the [Knip VS
|
|
41
|
+
Code Extension][1].
|
|
42
|
+
|
|
43
|
+
Start:
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
npx @knip/mcp
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Note: The VS Code extension has this MCP Server built-in.
|
|
50
|
+
|
|
51
|
+
## Language Server
|
|
52
|
+
|
|
53
|
+
The IDE integrations are powered by the Knip Language Server. It builds the full
|
|
54
|
+
module graph of your project and provides a session with a graph explorer. See
|
|
55
|
+
the [Knip Language Server documentation][10] for more details and information on
|
|
56
|
+
integrating Knip.
|
|
57
|
+
|
|
58
|
+
## VS Code Extension Screenshots
|
|
59
|
+
|
|
60
|
+
### Lint Findings
|
|
61
|
+
|
|
62
|
+
![Lint Findings][11]
|
|
63
|
+
|
|
64
|
+
### Imports & Exports
|
|
65
|
+
|
|
66
|
+
![Hover over imports and exports][12]
|
|
67
|
+
|
|
68
|
+
### Contention
|
|
69
|
+
|
|
70
|
+
The IDE extension shows extra issues in the tree views like circular
|
|
71
|
+
dependencies.
|
|
72
|
+
|
|
73
|
+
#### Circular Dependencies
|
|
74
|
+
|
|
75
|
+
![Circular Dependencies][13]
|
|
76
|
+
|
|
77
|
+
#### Conflicts
|
|
78
|
+
|
|
79
|
+
![Conflicts][14]
|
|
80
|
+
|
|
81
|
+
#### Branching
|
|
82
|
+
|
|
83
|
+
![Branching][15]
|
|
84
|
+
|
|
85
|
+
### Settings
|
|
86
|
+
|
|
87
|
+
![VS Code Extension Settings][16]
|
|
88
|
+
|
|
89
|
+
[1]: #vs-code-extension
|
|
90
|
+
[2]: #jetbrains-plugin
|
|
91
|
+
[3]: #mcp-server
|
|
92
|
+
[4]: #language-server
|
|
93
|
+
[5]: https://marketplace.visualstudio.com/items?itemName=webpro.vscode-knip
|
|
94
|
+
[6]: https://open-vsx.org/extension/webpro/vscode-knip
|
|
95
|
+
[7]: #vs-code-extension-screenshots
|
|
96
|
+
[8]: https://plugins.jetbrains.com/plugin/29765-knip
|
|
97
|
+
[9]: https://www.npmjs.com/package/@knip/mcp
|
|
98
|
+
[10]:
|
|
99
|
+
https://github.com/webpro-nl/knip/blob/main/packages/language-server/README.md
|
|
100
|
+
[11]: /screenshots/editors-and-agents/diagnostics.webp
|
|
101
|
+
[12]: /screenshots/editors-and-agents/imports-exports.webp
|
|
102
|
+
[13]: /screenshots/editors-and-agents/circular-dependency.webp
|
|
103
|
+
[14]: /screenshots/editors-and-agents/conflict.webp
|
|
104
|
+
[15]: /screenshots/editors-and-agents/branch.webp
|
|
105
|
+
[16]: /screenshots/editors-and-agents/vscode-extension-settings.webp
|
|
@@ -2,31 +2,50 @@
|
|
|
2
2
|
title: Known Issues
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
List of known issues and workarounds for exceptions thrown during a Knip run.
|
|
6
|
+
|
|
7
|
+
See [handling issues][1] to learn more about dealing with lint issues.
|
|
6
8
|
|
|
7
9
|
## Exceptions from config files
|
|
8
10
|
|
|
9
11
|
An exception may be thrown when a Knip plugin loads a JavaScript or TypeScript
|
|
10
|
-
configuration file such as `webpack.config.js` or `vite.config.ts
|
|
11
|
-
load such files differently, in a different environment, or without certain
|
|
12
|
-
environment variables set.
|
|
12
|
+
configuration file such as `webpack.config.js` or `vite.config.ts`:
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
```sh
|
|
15
|
+
$ knip
|
|
16
|
+
Error loading .../vite.config.ts
|
|
17
|
+
```
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
Knip may load such files differently, in a different environment, with missing
|
|
20
|
+
environment variables, missing path aliases, etcetera. Use `--debug` to locate
|
|
21
|
+
the cause of the issue with more details.
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
Potential workarounds:
|
|
24
|
+
|
|
25
|
+
- [Set path aliases][2] for "Cannot find module" errors
|
|
26
|
+
- Set missing environment variable(s), potential solutions:
|
|
27
|
+
- Use a helper package like [dotenvx][3]
|
|
28
|
+
- `KEY=VAL knip`
|
|
29
|
+
- `node --env-file .env $(which knip)`
|
|
30
|
+
- Disable loading the file by overriding the default `config` for that plugin.
|
|
31
|
+
- Example: `vite: { config: [] }`
|
|
32
|
+
- In a monorepo, be more specific like so:
|
|
33
|
+
`workspaces: { "packages/lib": { vite: { config: [] } } }`
|
|
34
|
+
- If this helps, add the file as an `entry` file for static analysis.
|
|
35
|
+
- Disable the related plugin.
|
|
36
|
+
- Example: `eslint: false`
|
|
37
|
+
- In a monorepo, be more specific like so:
|
|
38
|
+
`workspaces: { "packages/lib": { eslint: false } }`
|
|
39
|
+
- If this helps, add the file as an `entry` file for static analysis.
|
|
40
|
+
- As a last resort, ignore the workspace: `ignoreWorkspaces: ["packages/lib"]`.
|
|
23
41
|
|
|
24
42
|
## Path aliases in config files
|
|
25
43
|
|
|
26
44
|
Loading the configuration file (e.g. `cypress.config.ts`) for one of Knip's
|
|
27
45
|
plugins may give an error:
|
|
28
46
|
|
|
29
|
-
```
|
|
47
|
+
```sh
|
|
48
|
+
$ knip
|
|
30
49
|
Analyzing workspace ....
|
|
31
50
|
Error loading .../cypress.config.ts
|
|
32
51
|
Reason: Cannot find module '@alias/name'
|
|
@@ -35,15 +54,15 @@ Require stack:
|
|
|
35
54
|
```
|
|
36
55
|
|
|
37
56
|
Some tools (such as Cypress and Jest) support using TypeScript path aliases in
|
|
38
|
-
the configuration file.
|
|
39
|
-
compared to `tsconfig.json#compilerOptions.paths` and `knip.json#paths` (e.g.
|
|
40
|
-
the target values are not arrays).
|
|
57
|
+
the configuration file.
|
|
41
58
|
|
|
42
59
|
Potential workarounds:
|
|
43
60
|
|
|
44
61
|
- Rewrite the import in the configuration file to a relative import.
|
|
45
|
-
-
|
|
46
|
-
-
|
|
62
|
+
- Inject support with a module like `tsx`: `NODE_OPTIONS="--import tsx" knip`
|
|
63
|
+
- Or `tsconfig-paths`: `NODE_OPTIONS="--import tsconfig-paths/register.js" knip`
|
|
64
|
+
- Use Bun with [knip-bun][4].
|
|
65
|
+
- See [exceptions from config files][5] for more potential workarounds.
|
|
47
66
|
|
|
48
67
|
## Nx Daemon
|
|
49
68
|
|
|
@@ -53,12 +72,15 @@ In Nx projects you might encounter this error:
|
|
|
53
72
|
NX Daemon process terminated and closed the connection
|
|
54
73
|
```
|
|
55
74
|
|
|
56
|
-
The solution is to [disable the Nx Daemon][
|
|
75
|
+
The solution is to [disable the Nx Daemon][6]:
|
|
57
76
|
|
|
58
77
|
```sh
|
|
59
78
|
NX_DAEMON=false knip
|
|
60
79
|
```
|
|
61
80
|
|
|
62
|
-
[1]:
|
|
63
|
-
[2]:
|
|
64
|
-
[3]: https://
|
|
81
|
+
[1]: ../guides/handling-issues.mdx
|
|
82
|
+
[2]: #path-aliases-in-config-files
|
|
83
|
+
[3]: https://dotenvx.com/
|
|
84
|
+
[4]: ./cli.md#knip-bun
|
|
85
|
+
[5]: #exceptions-from-config-files
|
|
86
|
+
[6]: https://nx.dev/concepts/nx-daemon#turning-it-off
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: Plugins (
|
|
2
|
+
title: Plugins (131)
|
|
3
3
|
tableOfContents: false
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -7,6 +7,7 @@ tableOfContents: false
|
|
|
7
7
|
- [Angular](/reference/plugins/angular "Angular")
|
|
8
8
|
- [Astro](/reference/plugins/astro "Astro")
|
|
9
9
|
- [Astro DB](/reference/plugins/astro-db "Astro DB")
|
|
10
|
+
- [astro-og-canvas](/reference/plugins/astro-og-canvas "astro-og-canvas")
|
|
10
11
|
- [Ava](/reference/plugins/ava "Ava")
|
|
11
12
|
- [Babel](/reference/plugins/babel "Babel")
|
|
12
13
|
- [Biome](/reference/plugins/biome "Biome")
|
|
@@ -32,6 +33,7 @@ tableOfContents: false
|
|
|
32
33
|
- [Eleventy](/reference/plugins/eleventy "Eleventy")
|
|
33
34
|
- [ESLint](/reference/plugins/eslint "ESLint")
|
|
34
35
|
- [Expo](/reference/plugins/expo "Expo")
|
|
36
|
+
- [Expressive Code](/reference/plugins/expressive-code "Expressive Code")
|
|
35
37
|
- [Gatsby](/reference/plugins/gatsby "Gatsby")
|
|
36
38
|
- [GitHub Action](/reference/plugins/github-action "GitHub Action")
|
|
37
39
|
- [GitHub Actions](/reference/plugins/github-actions "GitHub Actions")
|
|
@@ -42,6 +44,7 @@ tableOfContents: false
|
|
|
42
44
|
- [i18next Parser](/reference/plugins/i18next-parser "i18next Parser")
|
|
43
45
|
- [Jest](/reference/plugins/jest "Jest")
|
|
44
46
|
- [Karma](/reference/plugins/karma "Karma")
|
|
47
|
+
- [Knex](/reference/plugins/knex "Knex")
|
|
45
48
|
- [Ladle](/reference/plugins/ladle "Ladle")
|
|
46
49
|
- [Lefthook](/reference/plugins/lefthook "Lefthook")
|
|
47
50
|
- [lint-staged](/reference/plugins/lint-staged "lint-staged")
|
|
@@ -61,6 +64,7 @@ tableOfContents: false
|
|
|
61
64
|
- [Next.js](/reference/plugins/next "Next.js")
|
|
62
65
|
- [next-intl](/reference/plugins/next-intl "next-intl")
|
|
63
66
|
- [Next.js MDX](/reference/plugins/next-mdx "Next.js MDX")
|
|
67
|
+
- [Nitro](/reference/plugins/nitro "Nitro")
|
|
64
68
|
- [Node.js](/reference/plugins/node "Node.js")
|
|
65
69
|
- [node-modules-inspector](/reference/plugins/node-modules-inspector "node-modules-inspector")
|
|
66
70
|
- [nodemon](/reference/plugins/nodemon "nodemon")
|
|
@@ -70,6 +74,7 @@ tableOfContents: false
|
|
|
70
74
|
- [nyc](/reference/plugins/nyc "nyc")
|
|
71
75
|
- [oclif](/reference/plugins/oclif "oclif")
|
|
72
76
|
- [Oxlint](/reference/plugins/oxlint "Oxlint")
|
|
77
|
+
- [Parcel](/reference/plugins/parcel "Parcel")
|
|
73
78
|
- [Playwright](/reference/plugins/playwright "Playwright")
|
|
74
79
|
- [Playwright for components](/reference/plugins/playwright-ct "Playwright for components")
|
|
75
80
|
- [playwright-test](/reference/plugins/playwright-test "playwright-test")
|
|
@@ -100,11 +105,13 @@ tableOfContents: false
|
|
|
100
105
|
- [Stryker](/reference/plugins/stryker "Stryker")
|
|
101
106
|
- [Stylelint](/reference/plugins/stylelint "Stylelint")
|
|
102
107
|
- [Svelte](/reference/plugins/svelte "Svelte")
|
|
108
|
+
- [SvelteKit](/reference/plugins/sveltekit "SvelteKit")
|
|
103
109
|
- [SVGO](/reference/plugins/svgo "SVGO")
|
|
104
110
|
- [SVGR](/reference/plugins/svgr "SVGR")
|
|
105
111
|
- [SWC](/reference/plugins/swc "SWC")
|
|
106
112
|
- [Syncpack](/reference/plugins/syncpack "Syncpack")
|
|
107
113
|
- [Tailwind](/reference/plugins/tailwind "Tailwind")
|
|
114
|
+
- [TanStack Router](/reference/plugins/tanstack-router "TanStack Router")
|
|
108
115
|
- [Taskfile](/reference/plugins/taskfile "Taskfile")
|
|
109
116
|
- [Travis CI](/reference/plugins/travis "Travis CI")
|
|
110
117
|
- [ts-node](/reference/plugins/ts-node "ts-node")
|
|
@@ -118,6 +125,7 @@ tableOfContents: false
|
|
|
118
125
|
- [Vercel OG](/reference/plugins/vercel-og "Vercel OG")
|
|
119
126
|
- [Vike](/reference/plugins/vike "Vike")
|
|
120
127
|
- [Vite](/reference/plugins/vite "Vite")
|
|
128
|
+
- [VitePress](/reference/plugins/vitepress "VitePress")
|
|
121
129
|
- [Vitest](/reference/plugins/vitest "Vitest")
|
|
122
130
|
- [Vue](/reference/plugins/vue "Vue")
|
|
123
131
|
- [WebdriverIO](/reference/plugins/webdriver-io "WebdriverIO")
|
|
@@ -4,10 +4,10 @@ title: Related Tooling
|
|
|
4
4
|
|
|
5
5
|
This is an overview of related tooling for features Knip does not support.
|
|
6
6
|
|
|
7
|
-
## Unused variables
|
|
7
|
+
## Unused imports & variables
|
|
8
8
|
|
|
9
|
-
Knip doesn't look for unused variables within a file. The focus is
|
|
10
|
-
|
|
9
|
+
Knip doesn't look for unused imports and variables within a file. The focus is
|
|
10
|
+
on exported values and types across files.
|
|
11
11
|
|
|
12
12
|
Use [ESLint][1], [Biome][2] or [oxlint][3] to find unused variables within
|
|
13
13
|
files.
|
package/src/docs/sponsors.mdx
CHANGED
|
@@ -8,7 +8,6 @@ import Posts from '../../components/Posts.astro';
|
|
|
8
8
|
import Projects from '../../components/Projects.astro';
|
|
9
9
|
import SponsorsComponent from '../../components/Sponsors.astro';
|
|
10
10
|
import SponsorsChart from '../../components/SponsorsChart.astro';
|
|
11
|
-
import SponsorsPast from '../../components/SponsorsPast.astro';
|
|
12
11
|
|
|
13
12
|
:::article{.prose}
|
|
14
13
|
|
|
@@ -40,8 +39,8 @@ one year before that.
|
|
|
40
39
|
|
|
41
40
|
<SponsorsChart />
|
|
42
41
|
|
|
43
|
-
- The monthly aggregated average over the charted period is $
|
|
44
|
-
- The monthly recurring average without one-time payments is $
|
|
42
|
+
- The monthly aggregated average over the charted period is $513.
|
|
43
|
+
- The monthly recurring average without one-time payments is $350.
|
|
45
44
|
- GitHub Sponsors is for my GitHub account. This has more repositories, but in
|
|
46
45
|
practice targets mostly Knip (and perhaps some [release-it][5]).
|
|
47
46
|
- [Chart generated][6] using [Venz][7].
|
|
@@ -61,5 +60,5 @@ one year before that.
|
|
|
61
60
|
[3]: https://github.com/sponsors/webpro
|
|
62
61
|
[4]: https://opencollective.com/knip
|
|
63
62
|
[5]: https://github.com/release-it/release-it
|
|
64
|
-
[6]: https://try.venz.dev?type=pivot&lp=tr&br=0&labelX=month&labelY=amount+\($\)&l=GitHub+Sponsors&color=%23fbfbfb&l=Open+Collective&color=%232487ff&label=2023-11&data=9,0&label=2023-12&data=74,0&label=2024-01&data=239,0&label=2024-02&data=489,0&label=2024-03&data=189,0&label=2024-04&data=204,750&label=2024-05&data=304,101&label=2024-06&data=1204,0&label=2024-07&data=204,35&label=2024-08&data=229,25&label=2024-09&data=2729,25&label=2024-10&data=410,45&label=2024-11&data=222,45&label=2024-12&data=222,145&label=2025-01&data=342,145&label=2025-02&data=244,145&label=2025-03&data=222,145&label=2025-04&data=222,145&label=2025-05&data=242,145&label=2025-06&data=247,145&label=2025-07&data=297,145&label=2025-08&data=268,145&label=2025-09&data=350,145&label=2025-10&data=375,145
|
|
63
|
+
[6]: https://try.venz.dev?type=pivot&lp=tr&br=0&labelX=month&labelY=amount+\($\)&l=GitHub+Sponsors&color=%23fbfbfb&l=Open+Collective&color=%232487ff&label=2023-11&data=9,0&label=2023-12&data=74,0&label=2024-01&data=239,0&label=2024-02&data=489,0&label=2024-03&data=189,0&label=2024-04&data=204,750&label=2024-05&data=304,101&label=2024-06&data=1204,0&label=2024-07&data=204,35&label=2024-08&data=229,25&label=2024-09&data=2729,25&label=2024-10&data=410,45&label=2024-11&data=222,45&label=2024-12&data=222,145&label=2025-01&data=342,145&label=2025-02&data=244,145&label=2025-03&data=222,145&label=2025-04&data=222,145&label=2025-05&data=242,145&label=2025-06&data=247,145&label=2025-07&data=297,145&label=2025-08&data=268,145&label=2025-09&data=350,145&label=2025-10&data=375,145&label=2025-11&data=549,145&label=2025-12&data=355,145
|
|
65
64
|
[7]: https://try.venz.dev
|