@knip/mcp 0.0.19 → 0.0.20

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.
Files changed (70) hide show
  1. package/package.json +16 -16
  2. package/src/docs/blog/knip-v3.mdx +1 -1
  3. package/src/docs/blog/knip-v4.mdx +1 -1
  4. package/src/docs/explanations/comparison-and-migration.md +2 -0
  5. package/src/docs/explanations/plugins.md +22 -4
  6. package/src/docs/features/auto-fix.mdx +2 -2
  7. package/src/docs/guides/handling-issues.mdx +1 -1
  8. package/src/docs/guides/issue-reproduction.md +7 -6
  9. package/src/docs/guides/performance.md +1 -1
  10. package/src/docs/overview/features.md +1 -1
  11. package/src/docs/reference/faq.md +101 -38
  12. package/src/docs/reference/jsdoc-tsdoc-tags.md +12 -1
  13. package/src/docs/reference/plugins.md +7 -1
  14. package/src/docs/writing-a-plugin/index.md +1 -1
  15. package/src/docs/docs/blog/brief-history.md +0 -30
  16. package/src/docs/docs/blog/for-editors-and-agents.md +0 -131
  17. package/src/docs/docs/blog/knip-v3.mdx +0 -88
  18. package/src/docs/docs/blog/knip-v4.mdx +0 -149
  19. package/src/docs/docs/blog/knip-v5.mdx +0 -190
  20. package/src/docs/docs/blog/migration-to-v1.md +0 -65
  21. package/src/docs/docs/blog/release-notes-v2.md +0 -46
  22. package/src/docs/docs/blog/slim-down-to-speed-up.md +0 -269
  23. package/src/docs/docs/blog/state-of-knip.md +0 -191
  24. package/src/docs/docs/blog/two-years.mdx +0 -107
  25. package/src/docs/docs/explanations/comparison-and-migration.md +0 -133
  26. package/src/docs/docs/explanations/entry-files.md +0 -70
  27. package/src/docs/docs/explanations/plugins.md +0 -347
  28. package/src/docs/docs/explanations/why-use-knip.md +0 -128
  29. package/src/docs/docs/features/auto-fix.mdx +0 -348
  30. package/src/docs/docs/features/compilers.md +0 -172
  31. package/src/docs/docs/features/integrated-monorepos.md +0 -61
  32. package/src/docs/docs/features/monorepos-and-workspaces.md +0 -149
  33. package/src/docs/docs/features/production-mode.md +0 -95
  34. package/src/docs/docs/features/reporters.md +0 -304
  35. package/src/docs/docs/features/rules-and-filters.md +0 -102
  36. package/src/docs/docs/features/script-parser.md +0 -156
  37. package/src/docs/docs/features/source-mapping.md +0 -100
  38. package/src/docs/docs/guides/configuring-project-files.md +0 -205
  39. package/src/docs/docs/guides/contributing.md +0 -24
  40. package/src/docs/docs/guides/handling-issues.mdx +0 -708
  41. package/src/docs/docs/guides/issue-reproduction.md +0 -103
  42. package/src/docs/docs/guides/namespace-imports.md +0 -125
  43. package/src/docs/docs/guides/performance.md +0 -108
  44. package/src/docs/docs/guides/troubleshooting.md +0 -133
  45. package/src/docs/docs/guides/using-knip-in-ci.md +0 -50
  46. package/src/docs/docs/guides/working-with-commonjs.md +0 -72
  47. package/src/docs/docs/index.mdx +0 -160
  48. package/src/docs/docs/overview/configuration.md +0 -104
  49. package/src/docs/docs/overview/features.md +0 -66
  50. package/src/docs/docs/overview/getting-started.mdx +0 -205
  51. package/src/docs/docs/overview/screenshots-videos.md +0 -42
  52. package/src/docs/docs/playground.mdx +0 -38
  53. package/src/docs/docs/reference/cli.md +0 -511
  54. package/src/docs/docs/reference/configuration-hints.md +0 -146
  55. package/src/docs/docs/reference/configuration.md +0 -430
  56. package/src/docs/docs/reference/dynamic-configuration.mdx +0 -72
  57. package/src/docs/docs/reference/faq.md +0 -430
  58. package/src/docs/docs/reference/integrations.md +0 -105
  59. package/src/docs/docs/reference/issue-types.md +0 -43
  60. package/src/docs/docs/reference/jsdoc-tsdoc-tags.md +0 -122
  61. package/src/docs/docs/reference/known-issues.md +0 -86
  62. package/src/docs/docs/reference/plugins/.gitkeep +0 -0
  63. package/src/docs/docs/reference/plugins.md +0 -140
  64. package/src/docs/docs/reference/related-tooling.md +0 -46
  65. package/src/docs/docs/sponsors.mdx +0 -64
  66. package/src/docs/docs/typescript/unused-dependencies.md +0 -86
  67. package/src/docs/docs/typescript/unused-exports.md +0 -87
  68. package/src/docs/docs/writing-a-plugin/argument-parsing.md +0 -202
  69. package/src/docs/docs/writing-a-plugin/index.md +0 -392
  70. package/src/docs/docs/writing-a-plugin/inputs.md +0 -162
package/package.json CHANGED
@@ -1,34 +1,34 @@
1
1
  {
2
2
  "name": "@knip/mcp",
3
- "version": "0.0.19",
3
+ "version": "0.0.20",
4
4
  "description": "Knip MCP Server",
5
- "type": "module",
6
- "bin": {
7
- "knip-mcp": "./src/cli.js"
8
- },
9
- "exports": {
10
- ".": "./src/server.js",
11
- "./tools": "./src/tools.js"
12
- },
13
- "files": [
14
- "src"
15
- ],
16
5
  "keywords": [
17
6
  "knip",
18
7
  "mcp",
19
8
  "model-context-protocol"
20
9
  ],
10
+ "license": "ISC",
11
+ "author": "Lars Kappert <lars@webpro.nl>",
21
12
  "repository": {
22
13
  "type": "git",
23
14
  "url": "git+https://github.com/webpro-nl/knip.git",
24
15
  "directory": "packages/mcp-server"
25
16
  },
26
- "author": "Lars Kappert <lars@webpro.nl>",
27
- "license": "ISC",
17
+ "bin": {
18
+ "knip-mcp": "./src/cli.js"
19
+ },
20
+ "files": [
21
+ "src"
22
+ ],
23
+ "type": "module",
24
+ "exports": {
25
+ ".": "./src/server.js",
26
+ "./tools": "./src/tools.js"
27
+ },
28
28
  "dependencies": {
29
- "@modelcontextprotocol/sdk": "^1.25.3",
29
+ "@modelcontextprotocol/sdk": "^1.27.1",
30
30
  "zod": "^4.1.11",
31
- "knip": "^5.84.0"
31
+ "knip": "^5.86.0"
32
32
  },
33
33
  "engines": {
34
34
  "node": ">=18.18.0"
@@ -82,7 +82,7 @@ Remember, Knip it before you ship it! Have a great day ☀️
82
82
  [3]: https://github.com/webpro-nl/knip/stargazers
83
83
  [4]: https://github.com/webpro-nl/knip/network/dependents
84
84
  [5]: https://github.com/marketplace/actions/knip-reporter
85
- [6]: ../reference/cli.md#exit-code
85
+ [6]: ../reference/cli.md#--no-exit-code
86
86
  [7]: ../features/production-mode.md
87
87
  [8]: ../reference/jsdoc-tsdoc-tags.md#internal
88
88
  [9]: ../features/reporters.md#json
@@ -146,4 +146,4 @@ Remember, Knip it before you ship it! Have a great day ☀️
146
146
  [2]: ../features/compilers.md
147
147
  [3]: ../guides/issue-reproduction.md
148
148
  [4]: https://github.com/sponsors/webpro
149
- [5]: ../reference/cli.md#--experimental-tags
149
+ [5]: ../reference/cli.md#--tags
@@ -36,6 +36,8 @@ depcheck
36
36
  knip --dependencies
37
37
  ```
38
38
 
39
+ **Project status**: The project is archived and recommends Knip.
40
+
39
41
  ### unimported
40
42
 
41
43
  > Find and fix dangling files and unused dependencies in your JavaScript
@@ -86,8 +86,8 @@ plugins contain `package.json` in the list of `config` files.
86
86
 
87
87
  :::tip[Summary]
88
88
 
89
- Plugins parse `config` files to find external dependencies. Knip uses this to
90
- determine unused and unlisted dependencies.
89
+ Plugins load configuration files to find referenced dependencies, and determine
90
+ unused and unlisted dependencies.
91
91
 
92
92
  :::
93
93
 
@@ -100,8 +100,8 @@ dependencies.
100
100
  For example, if `next` is listed as a dependency in `package.json`, the Next.js
101
101
  plugin will automatically add multiple patterns as entry files, such as
102
102
  `pages/**/*.{js,jsx,ts,tsx}`. If `vitest` is listed, the Vitest plugin adds
103
- `**/*.{test,test-d,spec}.ts` as entry file patterns. Most plugins have entry
104
- files configured, so you don't have to.
103
+ `**/*.{test,test-d,spec,spec-d}.ts` as entry file patterns. Most plugins have
104
+ entry files configured, so you don't have to.
105
105
 
106
106
  It's mostly plugins for meta frameworks and test runners that have `entry` files
107
107
  configured.
@@ -304,6 +304,23 @@ playwright test -c playwright.web.config.ts
304
304
 
305
305
  Please see [script parser][10] for more details.
306
306
 
307
+ ## Config File Location
308
+
309
+ If configuration files aren't in their default location and they are not
310
+ referenced through some script like `vite -c ./dir/vite.config.ts`, then make
311
+ sure to tell Knip about it. Two examples:
312
+
313
+ ```json title="knip.jsonc"
314
+ {
315
+ "playwright": { "config": ["e2e/playwright.config.ts"] },
316
+ "vite": "packages/*/vite.config.ts" // shorthand without `config` and array notation
317
+ }
318
+ ```
319
+
320
+ This is common in projects where a directory like `packages/lib` is not an
321
+ actual workspace with a `package.json` file. Also see [integrated monorepos][11]
322
+ for similar cases.
323
+
307
324
  ## Summary
308
325
 
309
326
  :::tip[Summary]
@@ -327,3 +344,4 @@ Plugins are configured with two distinct types of files:
327
344
  [8]: ../reference/plugins/vitest.md
328
345
  [9]: ../guides/handling-issues.mdx#conditional-or-dynamic-dependencies
329
346
  [10]: ../features/script-parser.md
347
+ [11]: ../features/integrated-monorepos.md
@@ -42,10 +42,10 @@ knip --fix --allow-remove-files
42
42
 
43
43
  Use `--fix-type` to fix only specific issue types:
44
44
 
45
- - `files`
45
+ - `dependencies`
46
46
  - `exports`
47
47
  - `types`
48
- - `dependencies`
48
+ - `files`
49
49
  - `catalog`
50
50
 
51
51
  Example:
@@ -689,7 +689,7 @@ issue on GitHub. It'll make Knip better for everyone!
689
689
  [32]: #dependencies-named-after-nodejs-builtins
690
690
  [33]: #unlisted-binaries
691
691
  [34]: https://github.com/webpro-nl/knip/blob/e031018e676c47d84873cc2403251c0111ef318d/packages/knip/src/constants.ts#L39-L148
692
- [35]: ../features/monorepos-and-workspaces.md#lint-a-single-workspace
692
+ [35]: ../features/monorepos-and-workspaces.md#filter-workspaces
693
693
  [36]: #template-strings
694
694
  [37]: #unrecognized-path-aliases
695
695
  [38]: #external-aliased-imports
@@ -73,17 +73,17 @@ Other solutions to share a minimal and reproducible case may work well too,
73
73
  including:
74
74
 
75
75
  - A public repository on e.g. GitHub or GitLab.
76
- - A new [fixtures folder in the Knip repository][9].
76
+ - A pull request with a new [test][9] and/or [fixture folder][10].
77
77
 
78
78
  The goal is to have an easy and common understanding and reproduction. If you're
79
79
  unable to create a reproduction using one of the methods described then please
80
- clearly explain this in the issue or [contact me][10].
80
+ clearly explain this in the issue or [contact me][11].
81
81
 
82
82
  ## Pull Request
83
83
 
84
84
  The optimal way is to add fixtures and failing tests to the Knip repository, and
85
85
  open a pull request to discuss the issue! Also see [instructions for
86
- development][11].
86
+ development][12].
87
87
 
88
88
  [1]: https://github.com/webpro-nl/knip/issues?q=is%3Aissue
89
89
  [2]: https://knip.dev/reference/known-issues
@@ -97,6 +97,7 @@ development][11].
97
97
  https://stackblitz.com/github/webpro-nl/knip/tree/main/templates/issue-reproduction/monorepo
98
98
  [7]: https://codesandbox.io
99
99
  [8]: https://stackblitz.com
100
- [9]: https://github.com/webpro-nl/knip/tree/main/packages/knip/fixtures
101
- [10]: https://github.com/webpro
102
- [11]: https://github.com/webpro-nl/knip/blob/main/.github/DEVELOPMENT.md
100
+ [9]: https://github.com/webpro-nl/knip/blob/main/.github/DEVELOPMENT.md#tests
101
+ [10]: https://github.com/webpro-nl/knip/tree/main/packages/knip/fixtures
102
+ [11]: https://github.com/webpro
103
+ [12]: https://github.com/webpro-nl/knip/blob/main/.github/DEVELOPMENT.md
@@ -105,4 +105,4 @@ individual workspaces][6].
105
105
  [3]: ../guides/handling-issues.mdx#external-libraries
106
106
  [4]: ../reference/cli.md#--performance
107
107
  [5]: ../reference/configuration.md#ignoreexportsusedinfile
108
- [6]: ../features/monorepos-and-workspaces.md#lint-a-single-workspace
108
+ [6]: ../features/monorepos-and-workspaces.md#filter-workspaces
@@ -63,4 +63,4 @@ Also see [related tooling][2].
63
63
  [23]: ../features/production-mode.md#strict-mode
64
64
  [24]: ../guides/troubleshooting.md#trace
65
65
  [25]: ../reference/cli.md#--watch
66
- [26]: ../features/monorepos-and-workspaces.md#lint-a-single-workspace
66
+ [26]: ../features/monorepos-and-workspaces.md#filter-workspaces
@@ -22,6 +22,65 @@ This FAQ is an attempt to provide some perspective on a few design decisions and
22
22
  why certain things work the way they do. Here and there it's intentionally a bit
23
23
  more in-depth than the rest of the docs.
24
24
 
25
+ ## Why should I even bother to do all this?
26
+
27
+ Because the payoff is huge. While it might take a bit of effort to configure
28
+ Knip correctly initially, a clean module graph gives you absolute confidence in
29
+ your codebase. You can delete dead code, remove unused dependencies, and
30
+ refactor with certainty. It prevents the slow accumulation of technical debt and
31
+ keeps your project lean and fast. Once configured, Knip runs quickly in CI and
32
+ keeps your codebase pristine automatically.
33
+
34
+ :::tip
35
+
36
+ Try the [Knip MCP Server][1] or the [Knip Editor Extension][2]. Let your coding
37
+ agent use the built-in MCP Server and create a custom `knip.json` for you, so
38
+ you don't have to.
39
+
40
+ :::
41
+
42
+ ## Common Pitfalls
43
+
44
+ ### Why shouldn't I ignore or disable configuration hints?
45
+
46
+ Configuration hints are critical for building a healthy and accurate module
47
+ graph. They usually indicate that Knip cannot resolve a dependency, plugin, or
48
+ entry file. If you ignore or disable these hints, Knip's understanding of your
49
+ project will be incomplete, which inevitably leads to false positives (reporting
50
+ used code as unused). Always address configuration hints first before looking at
51
+ other reported issues.
52
+
53
+ ### Why is it a bad idea to use `ignore` patterns like I do in ESLint?
54
+
55
+ Knip is not a regular file-based linter like ESLint. It works by analyzing the
56
+ entire interconnected module graph of your project. Using `ignore` patterns does
57
+ not exclude files from the analysis, it only suppresses the reporting of issues
58
+ in those files. This hides real issues and creates blind spots. Instead of
59
+ ignoring files, ensure your entry points and plugins are configured correctly,
60
+ and use `project` patterns to define the boundaries of your codebase. Read more:
61
+ [Configuring Project Files][3].
62
+
63
+ If you have specific exports (such as types) that are only used within the file
64
+ they are defined, use the [ignoreExportsUsedInFile][4] configuration option
65
+ rather than ignoring the file entirely.
66
+
67
+ ### How should I exclude tests and development tools from the analysis?
68
+
69
+ A common mistake is trying to exclude test files, storybooks, or development
70
+ tools using `project` or `ignore` patterns. The correct approach is to use
71
+ [production mode][5]. This mode is specifically designed to strictly analyze
72
+ only your production source code and `dependencies`, automatically excluding
73
+ tests and `devDependencies` without requiring complex ignore rules.
74
+
75
+ ### Why shouldn't I run `knip --fix` immediately?
76
+
77
+ Running `knip --fix` before your configuration is fully settled is dangerous. If
78
+ your configuration is missing entry points or has unresolved hints, Knip might
79
+ think perfectly valid, actively used code is unused. Auto-fixing in this state
80
+ can lead to deleting code that your application relies on. Always verify the
81
+ reported issues manually and ensure your configuration is solid before using the
82
+ `--fix` flag.
83
+
25
84
  ## Comparison
26
85
 
27
86
  ### Why isn't Knip an ESLint plugin?
@@ -53,10 +112,10 @@ Issues reported by the linter are for you to handle and review.
53
112
 
54
113
  Besides those differences, Knip has a broader scope:
55
114
 
56
- - Improve DX (see [less is more][1]).
57
- - Unless using [production mode][2], also lint all source code like tests,
115
+ - Improve DX (see [less is more][6]).
116
+ - Unless using [production mode][5], also lint all source code like tests,
58
117
  scripts and Storybook stories.
59
- - Handle more [types of issues][3] (such as unlisted dependencies).
118
+ - Handle more [types of issues][7] (such as unlisted dependencies).
60
119
 
61
120
  ## Synergy
62
121
 
@@ -89,13 +148,13 @@ Building up the module and dependency graphs requires non-standard module
89
148
  resolution and not only static but also dynamic analysis (i.e. actually load and
90
149
  execute modules), such as for parsers of plugins to receive the exported value
91
150
  of dynamic tooling configuration files. Additionally, [exports consumed by
92
- external libraries][4] require type information, as supported by the TypeScript
151
+ external libraries][8] require type information, as supported by the TypeScript
93
152
  backend. Last but not least, shell script parsing is required to find the right
94
153
  entry files, configuration files and dependencies accurately.
95
154
 
96
155
  The rippling effect of plugins and recursively adding entry files and
97
156
  dependencies to build up the graphs is also exactly what's meant by
98
- ["comprehensive" here][5].
157
+ ["comprehensive" here][9].
99
158
 
100
159
  ## Building the graphs
101
160
 
@@ -143,7 +202,7 @@ files (`config/vitest.config.ts` and `playwright.e2e.config.ts` in the examples
143
202
  above). They're recognized as configuration files and passed to their respective
144
203
  plugins, and may contain additional entry files.
145
204
 
146
- Entry files are added to the module graph. [Module resolution][6] might result
205
+ Entry files are added to the module graph. [Module resolution][10] might result
147
206
  in additional entry files recursively until no more entry files are found.
148
207
 
149
208
  ### What does Knip look for in source files?
@@ -156,7 +215,7 @@ all nodes of the generated AST to find:
156
215
  - Accessed properties on namespace imports and re-exports to track individual
157
216
  export usage
158
217
  - Calls to `require.resolve` and `import.meta.resolve`
159
- - Scripts in template strings (passed to [script parser][7])
218
+ - Scripts in template strings (passed to [script parser][11])
160
219
 
161
220
  ### What's in the graphs?
162
221
 
@@ -194,7 +253,7 @@ there are a few issues with this approach:
194
253
 
195
254
  - It requires lockfile parsing for each lockfile format and version of each
196
255
  package manager.
197
- - The lockfile doesn't contain whether the package [has types included][8].
256
+ - The lockfile doesn't contain whether the package [has types included][12].
198
257
 
199
258
  ## Module Resolution
200
259
 
@@ -215,12 +274,12 @@ seem to meet all requirements to be usable on its own by Knip:
215
274
  `module.js`
216
275
 
217
276
  A few strategies have been tried and tweaked, and Knip currently uses a
218
- combination of [oxc-resolver][9], the TypeScript module resolver and a few
277
+ combination of [oxc-resolver][13], the TypeScript module resolver and a few
219
278
  customizations. This single custom module resolver function is hooked into the
220
279
  TypeScript compiler and language service hosts.
221
280
 
222
- Everything else is handled by `oxc-resolver` for things like [script parsing][7]
223
- and resolving references to files in other workspaces.
281
+ Everything else is handled by `oxc-resolver` for things like [script
282
+ parsing][11] and resolving references to files in other workspaces.
224
283
 
225
284
  ### How does Knip handle non-standard import syntax?
226
285
 
@@ -250,7 +309,7 @@ file. They're not a concept in Knip.
250
309
 
251
310
  A TypeScript program has a 1-to-1 relationship with workspaces if they're
252
311
  analyzed in isolation. However, by default Knip optimizes for performance and
253
- utilizes [workspace sharing][10]. That's why debug output contains messages like
312
+ utilizes [workspace sharing][14]. That's why debug output contains messages like
254
313
  "Installed 2 programs for 29 workspaces".
255
314
 
256
315
  ### Why doesn't Knip match my TypeScript project structure?
@@ -282,7 +341,7 @@ Knip shares the files of multiple workspaces in a single program if their
282
341
  configuration allows it. This optimization is enabled by default, while it also
283
342
  allows the module resolver (one per program) to do some more caching.
284
343
 
285
- Also see [workspace sharing][10].
344
+ Also see [workspace sharing][14].
286
345
 
287
346
  ### Why doesn't Knip just use `ts.findReferences`?
288
347
 
@@ -298,7 +357,7 @@ comprehensive graph include:
298
357
  Without sacrificing these benefits, Knip does use `ts.findReferences` to find
299
358
  references to class members (i.e. when the issue type `classMembers` is
300
359
  included). In case analysis of exports requires type information of external
301
- dependencies, the [`--include-libs ` flag][4] will trigger the same.
360
+ dependencies, the [`--include-libs ` flag][8] will trigger the same.
302
361
 
303
362
  ### Why can't I use path aliases to reference other workspaces?
304
363
 
@@ -310,19 +369,19 @@ The recommendation and best practice is to list such workspaces/dependencies in
310
369
  `package.json`, and import them as such. Other tooling should not have any
311
370
  issues with this standard approach either.
312
371
 
313
- Also see the example in [TypeScript path aliases in monorepos][11].
372
+ Also see the example in [TypeScript path aliases in monorepos][15].
314
373
 
315
374
  ### What's up with that configurable `tsconfig.json` location?
316
375
 
317
376
  There's a difference between `--tsConfig [file]` as a CLI argument and the
318
377
  `typescript.config` option in Knip configuration.
319
378
 
320
- The [`--tsConfig [file]` option][12] is used to provide an alternative location
379
+ The [`--tsConfig [file]` option][16] is used to provide an alternative location
321
380
  for the default root `tsconfig.json` file. Relevant `compilerOptions` include
322
381
  `paths` and `moduleResolution`. This setting is only available at the root
323
382
  level.
324
383
 
325
- On the other hand, the [`config` option of the plugin][13] can be set per
384
+ On the other hand, the [`config` option of the plugin][17] can be set per
326
385
  workspace. The TypeScript plugin extracts referenced external dependencies such
327
386
  as those in `extends`, `compilerOptions.types` and JSX settings:
328
387
 
@@ -346,7 +405,7 @@ From this example, Knip can determine whether the `@tsconfig/node20` and
346
405
  for `tsconfig.json` can be set per workspace.
347
406
  - In case path aliases from `compilerOptions.paths` aren't picked up by Knip,
348
407
  either use `--tsConfig [file]` to target a different `tsconfig.json`, or
349
- manually add [paths][14] to the Knip configuration. The latter can be done per
408
+ manually add [paths][18] to the Knip configuration. The latter can be done per
350
409
  workspace.
351
410
 
352
411
  ## Compilers
@@ -369,7 +428,7 @@ other file types.
369
428
  Knip comes with basic "compilers" for a few common non-standard file types.
370
429
  They're not actual compilers, they're regular expressions only to extract import
371
430
  statements. Override the built-in Vue "compiler" with the real one in your
372
- project. Also see the answer to the previous question and [Compilers][15].
431
+ project. Also see the answer to the previous question and [Compilers][19].
373
432
 
374
433
  ## Miscellaneous
375
434
 
@@ -389,7 +448,7 @@ Which mode should've been the default? They both have their merits:
389
448
  tooling, including most issues found in production mode. This mode has the
390
449
  most impact on DX, for the same reason.
391
450
 
392
- Also see [production mode][2].
451
+ Also see [production mode][5].
393
452
 
394
453
  ### Why doesn't Knip have...?
395
454
 
@@ -410,21 +469,25 @@ Examples of features that have been requested include:
410
469
 
411
470
  These are all interesting ideas, but most increase the API surface area, and all
412
471
  require more development efforts and maintenance. Time is limited and
413
- [sponsorships][16] currently don't cover - this can change though!
414
-
415
- [1]: ../explanations/why-use-knip.md#less-is-more
416
- [2]: ../features/production-mode.md
417
- [3]: ./issue-types.md
418
- [4]: ../guides/handling-issues.mdx#external-libraries
419
- [5]: ../explanations/why-use-knip.md#comprehensive
420
- [6]: #module-resolution
421
- [7]: ../features/script-parser.md
422
- [8]: ../guides/handling-issues.mdx#type-definition-packages
423
- [9]: https://oxc.rs/docs/guide/usage/resolver.html
424
- [10]: ../guides/performance.md#workspace-sharing
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
472
+ [sponsorships][20] currently don't cover - this can change though!
473
+
474
+ [1]: ../reference/integrations.md#mcp-server
475
+ [2]: ../reference/integrations.md#vs-code-extension
476
+ [3]: ../guides/configuring-project-files.md
477
+ [4]: ../reference/configuration.md#ignoreexportsusedinfile
478
+ [5]: ../features/production-mode.md
479
+ [6]: ../explanations/why-use-knip.md#less-is-more
480
+ [7]: ./issue-types.md
481
+ [8]: ../guides/handling-issues.mdx#external-libraries
482
+ [9]: ../explanations/why-use-knip.md#comprehensive
483
+ [10]: #module-resolution
484
+ [11]: ../features/script-parser.md
485
+ [12]: ../guides/handling-issues.mdx#type-definition-packages
486
+ [13]: https://oxc.rs/docs/guide/usage/resolver.html
487
+ [14]: ../guides/performance.md#workspace-sharing
488
+ [15]: ../guides/handling-issues.mdx#typescript-path-aliases-in-monorepos
489
+ [16]: ../reference/cli.md#--tsconfig-file
490
+ [17]: ../explanations/plugins.md#configuration-files
491
+ [18]: ../reference/configuration.md#paths
492
+ [19]: ../features/compilers.md
493
+ [20]: /sponsors
@@ -30,7 +30,7 @@ Example:
30
30
  export const myUnusedExport = 1;
31
31
 
32
32
  /** @lintignore */
33
- import Unresolved from './generated/lib.js';
33
+ import Unresolved from "./generated/lib.js";
34
34
  ```
35
35
 
36
36
  And then include (`+`) or exclude (`-`) these tagged exports from the report
@@ -42,6 +42,17 @@ knip --tags=-lintignore,-internal
42
42
 
43
43
  Tags can also be [configured in `knip.json`][2].
44
44
 
45
+ When an excluded tag is no longer necessary because the export is actually used,
46
+ Knip reports a **tag hint**:
47
+
48
+ ```sh
49
+ Tag hints (1)
50
+ ignored unimported.ts Unused tag in unimported.ts: ignored → @custom
51
+ ```
52
+
53
+ This helps you clean up tags that were added to suppress issues that have since
54
+ been resolved.
55
+
45
56
  ## `@public`
46
57
 
47
58
  By default, Knip reports unused exports in non-entry files.
@@ -1,5 +1,5 @@
1
1
  ---
2
- title: Plugins (131)
2
+ title: Plugins (137)
3
3
  tableOfContents: false
4
4
  ---
5
5
 
@@ -32,6 +32,7 @@ tableOfContents: false
32
32
  - [Drizzle](/reference/plugins/drizzle "Drizzle")
33
33
  - [Eleventy](/reference/plugins/eleventy "Eleventy")
34
34
  - [ESLint](/reference/plugins/eslint "ESLint")
35
+ - [execa](/reference/plugins/execa "execa")
35
36
  - [Expo](/reference/plugins/expo "Expo")
36
37
  - [Expressive Code](/reference/plugins/expressive-code "Expressive Code")
37
38
  - [Gatsby](/reference/plugins/gatsby "Gatsby")
@@ -75,16 +76,20 @@ tableOfContents: false
75
76
  - [oclif](/reference/plugins/oclif "oclif")
76
77
  - [Oxlint](/reference/plugins/oxlint "Oxlint")
77
78
  - [Parcel](/reference/plugins/parcel "Parcel")
79
+ - [Payload CMS](/reference/plugins/payload "Payload CMS")
78
80
  - [Playwright](/reference/plugins/playwright "Playwright")
79
81
  - [Playwright for components](/reference/plugins/playwright-ct "Playwright for components")
80
82
  - [playwright-test](/reference/plugins/playwright-test "playwright-test")
81
83
  - [Plop](/reference/plugins/plop "Plop")
84
+ - [pm2](/reference/plugins/pm2 "pm2")
82
85
  - [pnpm](/reference/plugins/pnpm "pnpm")
83
86
  - [PostCSS](/reference/plugins/postcss "PostCSS")
84
87
  - [Preconstruct](/reference/plugins/preconstruct "Preconstruct")
85
88
  - [Prettier](/reference/plugins/prettier "Prettier")
86
89
  - [Prisma](/reference/plugins/prisma "Prisma")
90
+ - [Qwik](/reference/plugins/qwik "Qwik")
87
91
  - [React Cosmos](/reference/plugins/react-cosmos "React Cosmos")
92
+ - [React Native](/reference/plugins/react-native "React Native")
88
93
  - [React Router](/reference/plugins/react-router "React Router")
89
94
  - [Relay](/reference/plugins/relay "Relay")
90
95
  - [Release It!](/reference/plugins/release-it "Release It!")
@@ -135,6 +140,7 @@ tableOfContents: false
135
140
  - [xo](/reference/plugins/xo "xo")
136
141
  - [Yarn](/reference/plugins/yarn "Yarn")
137
142
  - [yorkie](/reference/plugins/yorkie "yorkie")
143
+ - [zx](/reference/plugins/zx "zx")
138
144
 
139
145
 
140
146
  :::
@@ -365,7 +365,7 @@ The script adds the plugin to the JSON Schema and type definitions.
365
365
  Run the test for your new plugin using one of the following commands:
366
366
 
367
367
  ```sh
368
- pnpm tsx --test test/plugins/tool.test.ts
368
+ node --test test/plugins/tool.test.ts
369
369
  bun test test/plugins/tool.test.ts
370
370
  ```
371
371
 
@@ -1,30 +0,0 @@
1
- ---
2
- title: A Brief History Of Knip
3
- date: 2023-10-15
4
- sidebar:
5
- order: 7
6
- ---
7
-
8
- _Published: 2023-10-15_
9
-
10
- If you are fond of short lists and brief histories, then this page was written
11
- just for you!
12
-
13
- - 2022-10-04: The [initial commit][1]. Still so tiny at that point, but the seed
14
- was planted. Starting out with finding unused files and exports, the name was
15
- Exportman! 🦸
16
- - 2022-10-09: Big plans and a rename 5 days later, the first published version
17
- of Knip was [v0.1.2][2].
18
- - 2022-11-22: Unused dependencies and support for workspaces and plugins in the
19
- [first alpha of v1][3].
20
- - 2023-01-10: Lots of testing and fixes led to [Knip v1][4].
21
- - 2023-03-22: [Knip v2][5] saw a full rewrite of the TypeScript backend.
22
- - 2023-10-15: [Introduction of Knip v3][6].
23
-
24
- [1]:
25
- https://github.com/webpro-nl/knip/commit/9589dfe22608da7d89f2613383da6db5826226d2
26
- [2]: https://github.com/webpro-nl/knip/tree/0.1.2
27
- [3]: https://github.com/webpro-nl/knip/releases/tag/1.0.0-alpha.0
28
- [4]: https://github.com/webpro-nl/knip/tree/1.0.0
29
- [5]: https://github.com/webpro-nl/knip/issues/73
30
- [6]: ./knip-v3.mdx