@knip/mcp 0.0.4 → 0.0.5
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/docs/docs/blog/brief-history.md +30 -0
- package/docs/docs/blog/for-editors-and-agents.md +124 -0
- package/docs/docs/blog/knip-v3.mdx +88 -0
- package/docs/docs/blog/knip-v4.mdx +149 -0
- package/docs/docs/blog/knip-v5.mdx +190 -0
- package/docs/docs/blog/migration-to-v1.md +65 -0
- package/docs/docs/blog/release-notes-v2.md +46 -0
- package/docs/docs/blog/slim-down-to-speed-up.md +269 -0
- package/docs/docs/blog/state-of-knip.md +191 -0
- package/docs/docs/blog/two-years.mdx +107 -0
- package/docs/docs/explanations/comparison-and-migration.md +129 -0
- package/docs/docs/explanations/entry-files.md +70 -0
- package/docs/docs/explanations/plugins.md +318 -0
- package/docs/docs/explanations/why-use-knip.md +128 -0
- package/docs/docs/features/auto-fix.mdx +333 -0
- package/docs/docs/features/compilers.md +172 -0
- package/docs/docs/features/integrated-monorepos.md +52 -0
- package/docs/docs/features/monorepos-and-workspaces.md +134 -0
- package/docs/docs/features/production-mode.md +95 -0
- package/docs/docs/features/reporters.md +302 -0
- package/docs/docs/features/rules-and-filters.md +102 -0
- package/docs/docs/features/script-parser.md +156 -0
- package/docs/docs/features/source-mapping.md +100 -0
- package/docs/docs/guides/configuring-project-files.md +205 -0
- package/docs/docs/guides/contributing.md +24 -0
- package/docs/docs/guides/handling-issues.mdx +646 -0
- package/docs/docs/guides/issue-reproduction.md +94 -0
- package/docs/docs/guides/namespace-imports.md +125 -0
- package/docs/docs/guides/performance.md +97 -0
- package/docs/docs/guides/troubleshooting.md +136 -0
- package/docs/docs/guides/using-knip-in-ci.md +54 -0
- package/docs/docs/guides/working-with-commonjs.md +72 -0
- package/docs/docs/index.mdx +160 -0
- package/docs/docs/overview/configuration.md +104 -0
- package/docs/docs/overview/features.md +66 -0
- package/docs/docs/overview/getting-started.mdx +195 -0
- package/docs/docs/overview/screenshots-videos.md +42 -0
- package/docs/docs/playground.mdx +38 -0
- package/docs/docs/reference/cli.md +485 -0
- package/docs/docs/reference/configuration.md +413 -0
- package/docs/docs/reference/dynamic-configuration.mdx +72 -0
- package/docs/docs/reference/faq.md +441 -0
- package/docs/docs/reference/issue-types.md +43 -0
- package/docs/docs/reference/jsdoc-tsdoc-tags.md +122 -0
- package/docs/docs/reference/known-issues.md +64 -0
- package/docs/docs/reference/plugins/.gitkeep +0 -0
- package/docs/docs/reference/plugins.md +238 -0
- package/docs/docs/reference/related-tooling.md +46 -0
- package/docs/docs/sponsors.mdx +65 -0
- package/docs/docs/typescript/unused-dependencies.md +86 -0
- package/docs/docs/typescript/unused-exports.md +87 -0
- package/docs/docs/writing-a-plugin/argument-parsing.md +202 -0
- package/docs/docs/writing-a-plugin/index.md +376 -0
- package/docs/docs/writing-a-plugin/inputs.md +162 -0
- package/package.json +8 -6
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Configuration
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
This page lists all configuration file options.
|
|
6
|
+
|
|
7
|
+
## File Types
|
|
8
|
+
|
|
9
|
+
### JSON Schema
|
|
10
|
+
|
|
11
|
+
A `$schema` field is a URL that you put at the top of your JSON file. This
|
|
12
|
+
allows you to get red squiggly lines inside of your IDE when you make a typo or
|
|
13
|
+
provide an otherwise invalid configuration option.
|
|
14
|
+
|
|
15
|
+
In JSON, use the provided JSON schema:
|
|
16
|
+
|
|
17
|
+
```json title="knip.json"
|
|
18
|
+
{
|
|
19
|
+
"$schema": "https://unpkg.com/knip@5/schema.json"
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### JSONC
|
|
24
|
+
|
|
25
|
+
In JSONC, use the provided JSONC schema:
|
|
26
|
+
|
|
27
|
+
```json title="knip.jsonc"
|
|
28
|
+
{
|
|
29
|
+
"$schema": "https://unpkg.com/knip@5/schema-jsonc.json"
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Use JSONC if you want to use comments and/or trailing commas.
|
|
34
|
+
|
|
35
|
+
### TypeScript
|
|
36
|
+
|
|
37
|
+
See [dynamic configuration][1] about dynamic and typed configuration files.
|
|
38
|
+
|
|
39
|
+
## Project
|
|
40
|
+
|
|
41
|
+
### `entry`
|
|
42
|
+
|
|
43
|
+
Array of glob patterns to find entry files. Prefix with `!` for negation.
|
|
44
|
+
Example:
|
|
45
|
+
|
|
46
|
+
```json title="knip.json"
|
|
47
|
+
{
|
|
48
|
+
"entry": ["src/index.ts", "scripts/*.ts", "!scripts/except-this-one.ts"]
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Also see [configuration][2] and [entry files][3].
|
|
53
|
+
|
|
54
|
+
### `project`
|
|
55
|
+
|
|
56
|
+
Array of glob patterns to find project files. Example:
|
|
57
|
+
|
|
58
|
+
```json title="knip.json"
|
|
59
|
+
{
|
|
60
|
+
"project": ["src/**/*.ts", "scripts/**/*.ts"]
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Also see [configuration][2] and [entry files][3].
|
|
65
|
+
|
|
66
|
+
### `paths`
|
|
67
|
+
|
|
68
|
+
Tools like TypeScript, webpack and Babel support import aliases in various ways.
|
|
69
|
+
Knip automatically includes `compilerOptions.paths` from the TypeScript
|
|
70
|
+
configuration, but does not automatically use other types of import aliases.
|
|
71
|
+
They can be configured manually:
|
|
72
|
+
|
|
73
|
+
```json title="knip.json"
|
|
74
|
+
{
|
|
75
|
+
"paths": {
|
|
76
|
+
"@lib": ["./lib/index.ts"],
|
|
77
|
+
"@lib/*": ["./lib/*"]
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Each workspace can have its own `paths` configured. Knip `paths` follow the
|
|
83
|
+
TypeScript semantics:
|
|
84
|
+
|
|
85
|
+
- Path values are an array of relative paths.
|
|
86
|
+
- Paths without an `*` are exact matches.
|
|
87
|
+
|
|
88
|
+
## Workspaces
|
|
89
|
+
|
|
90
|
+
Individual workspace configurations may contain all other options listed on this
|
|
91
|
+
page, except for the following root-only options:
|
|
92
|
+
|
|
93
|
+
- `exclude` / `include`
|
|
94
|
+
- `ignoreExportsUsedInFile`
|
|
95
|
+
- `ignoreWorkspaces`
|
|
96
|
+
- `workspaces`
|
|
97
|
+
|
|
98
|
+
Workspaces can't be nested in a Knip configuration, but they can be nested in a
|
|
99
|
+
monorepo folder structure.
|
|
100
|
+
|
|
101
|
+
Also see [Monorepos and workspaces][4].
|
|
102
|
+
|
|
103
|
+
## Plugins
|
|
104
|
+
|
|
105
|
+
There are a few options to modify the behavior of a plugin:
|
|
106
|
+
|
|
107
|
+
- Override a plugin's `config` or `entry` location
|
|
108
|
+
- Force-enable a plugin by setting its value to `true`
|
|
109
|
+
- Disable a plugin by setting its value to `false`
|
|
110
|
+
|
|
111
|
+
```json title="knip.json"
|
|
112
|
+
{
|
|
113
|
+
"mocha": {
|
|
114
|
+
"config": "config/mocha.config.js",
|
|
115
|
+
"entry": ["**/*.spec.js"]
|
|
116
|
+
},
|
|
117
|
+
"playwright": true,
|
|
118
|
+
"webpack": false
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
It should be rarely necessary to override the `entry` patterns, since plugins
|
|
123
|
+
also read custom entry file patterns from the tooling configuration (see
|
|
124
|
+
[Plugins → entry files][5]).
|
|
125
|
+
|
|
126
|
+
Plugin configuration can be set on root and on a per-workspace level. If enabled
|
|
127
|
+
on root level, it can be disabled on workspace level by setting it to `false`
|
|
128
|
+
there, and vice versa.
|
|
129
|
+
|
|
130
|
+
Also see [Plugins][6].
|
|
131
|
+
|
|
132
|
+
## Rules & Filters
|
|
133
|
+
|
|
134
|
+
### `rules`
|
|
135
|
+
|
|
136
|
+
See [Rules & Filters][7].
|
|
137
|
+
|
|
138
|
+
### `include`
|
|
139
|
+
|
|
140
|
+
See [Rules & Filters][7].
|
|
141
|
+
|
|
142
|
+
### `exclude`
|
|
143
|
+
|
|
144
|
+
See [Rules & Filters][7].
|
|
145
|
+
|
|
146
|
+
### `tags`
|
|
147
|
+
|
|
148
|
+
Exports can be tagged with known or arbitrary JSDoc/TSDoc tags:
|
|
149
|
+
|
|
150
|
+
```ts
|
|
151
|
+
/**
|
|
152
|
+
* Description of my exported value
|
|
153
|
+
*
|
|
154
|
+
* @type number
|
|
155
|
+
* @internal Important matters
|
|
156
|
+
* @lintignore
|
|
157
|
+
*/
|
|
158
|
+
export const myExport = 1;
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
And then include (`+`) or exclude (`-`) these tagged exports from the report
|
|
162
|
+
like so:
|
|
163
|
+
|
|
164
|
+
```json
|
|
165
|
+
{
|
|
166
|
+
"tags": ["-lintignore"]
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
This way, you can either focus on or ignore specific tagged exports with tags
|
|
171
|
+
you define yourself. This also works for individual class or enum members.
|
|
172
|
+
|
|
173
|
+
The default directive is `+` (include) and the `@` prefix is ignored, so the
|
|
174
|
+
notation below is valid and will report only exports tagged `@lintignore` or
|
|
175
|
+
`@internal`:
|
|
176
|
+
|
|
177
|
+
```json
|
|
178
|
+
{
|
|
179
|
+
"tags": ["@lintignore", "@internal"]
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Also see [JSDoc & TSDoc Tags][8].
|
|
184
|
+
|
|
185
|
+
### `treatConfigHintsAsErrors`
|
|
186
|
+
|
|
187
|
+
Exit with non-zero code (1) if there are any configuration hints.
|
|
188
|
+
|
|
189
|
+
```json title="knip.json"
|
|
190
|
+
{
|
|
191
|
+
"treatConfigHintsAsErrors": true
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
## Ignore Issues
|
|
196
|
+
|
|
197
|
+
### `ignore`
|
|
198
|
+
|
|
199
|
+
:::tip
|
|
200
|
+
|
|
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.
|
|
204
|
+
|
|
205
|
+
:::
|
|
206
|
+
|
|
207
|
+
Array of glob patterns to ignore issues from matching files. Example:
|
|
208
|
+
|
|
209
|
+
```json title="knip.json"
|
|
210
|
+
{
|
|
211
|
+
"ignore": ["src/generated.ts", "fixtures/**"]
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### `ignoreFiles`
|
|
216
|
+
|
|
217
|
+
Array of glob patterns of files to exclude from the "Unused files" section only.
|
|
218
|
+
|
|
219
|
+
Unlike `ignore`, which suppresses all issue types for matching files,
|
|
220
|
+
`ignoreFiles` only affects the `files` issue type. Use this when a file should
|
|
221
|
+
remain analyzed for other issues (exports, dependencies, unresolved) but should
|
|
222
|
+
not be considered for unused file detection.
|
|
223
|
+
|
|
224
|
+
```json title="knip.json"
|
|
225
|
+
{
|
|
226
|
+
"ignoreFiles": ["src/generated/**", "fixtures/**"]
|
|
227
|
+
}
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
Suffix an item with `!` to enable it only in production mode.
|
|
231
|
+
|
|
232
|
+
### `ignoreBinaries`
|
|
233
|
+
|
|
234
|
+
Exclude binaries that are used but not provided by any dependency from the
|
|
235
|
+
report. Value is an array of binary names or regular expressions. Example:
|
|
236
|
+
|
|
237
|
+
```json title="knip.json"
|
|
238
|
+
{
|
|
239
|
+
"ignoreBinaries": ["zip", "docker-compose", "pm2-.+"]
|
|
240
|
+
}
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
Actual regular expressions can be used in dynamic configurations:
|
|
244
|
+
|
|
245
|
+
```ts title="knip.ts"
|
|
246
|
+
export default {
|
|
247
|
+
ignoreBinaries: [/^pm2-.+/],
|
|
248
|
+
};
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Suffix an item with `!` to enable it only in production mode.
|
|
252
|
+
|
|
253
|
+
### `ignoreDependencies`
|
|
254
|
+
|
|
255
|
+
Array of package names to exclude from the report. Regular expressions allowed.
|
|
256
|
+
Example:
|
|
257
|
+
|
|
258
|
+
```json title="knip.json"
|
|
259
|
+
{
|
|
260
|
+
"ignoreDependencies": ["hidden-package", "@org/.+"]
|
|
261
|
+
}
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
Actual regular expressions can be used in dynamic configurations:
|
|
265
|
+
|
|
266
|
+
```ts title="knip.ts"
|
|
267
|
+
export default {
|
|
268
|
+
ignoreDependencies: [/@org\/.*/, /^lib-.+/],
|
|
269
|
+
};
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
Suffix an item with `!` to enable it only in production mode.
|
|
273
|
+
|
|
274
|
+
### `ignoreMembers`
|
|
275
|
+
|
|
276
|
+
Array of class and enum members to exclude from the report. Regular expressions
|
|
277
|
+
allowed. Example:
|
|
278
|
+
|
|
279
|
+
```json title="knip.json"
|
|
280
|
+
{
|
|
281
|
+
"ignoreMembers": ["render", "on.+"]
|
|
282
|
+
}
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
Actual regular expressions can be used in dynamic configurations.
|
|
286
|
+
|
|
287
|
+
### `ignoreUnresolved`
|
|
288
|
+
|
|
289
|
+
Array of specifiers to exclude from the report. Regular expressions allowed.
|
|
290
|
+
Example:
|
|
291
|
+
|
|
292
|
+
```json title="knip.json"
|
|
293
|
+
{
|
|
294
|
+
"ignoreUnresolved": ["ignore-unresolved-import", "#virtual/.+"]
|
|
295
|
+
}
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
Actual regular expressions can be used in dynamic configurations:
|
|
299
|
+
|
|
300
|
+
```ts title="knip.ts"
|
|
301
|
+
export default {
|
|
302
|
+
ignoreUnresolved: [/^#/.+/],
|
|
303
|
+
};
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### `ignoreWorkspaces`
|
|
307
|
+
|
|
308
|
+
Array of workspaces to ignore, globs allowed. Example:
|
|
309
|
+
|
|
310
|
+
```json title="knip.json"
|
|
311
|
+
{
|
|
312
|
+
"ignoreWorkspaces": [
|
|
313
|
+
"packages/go-server",
|
|
314
|
+
"packages/flat/*",
|
|
315
|
+
"packages/deep/**"
|
|
316
|
+
]
|
|
317
|
+
}
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
Suffix an item with `!` to enable it only in production mode.
|
|
321
|
+
|
|
322
|
+
Prefix an item with `!` to override an earlier wildcard.
|
|
323
|
+
|
|
324
|
+
### `ignoreIssues`
|
|
325
|
+
|
|
326
|
+
Ignore specific issue types for specific file patterns. Keys are glob patterns
|
|
327
|
+
and values are arrays of issue types to ignore for matching files. This allows
|
|
328
|
+
ignoring specific issues (like unused exports) in generated files while still
|
|
329
|
+
reporting other issues in those same files.
|
|
330
|
+
|
|
331
|
+
```json title="knip.json"
|
|
332
|
+
{
|
|
333
|
+
"ignoreIssues": {
|
|
334
|
+
"src/generated/**": ["exports", "types"],
|
|
335
|
+
"**/*.generated.ts": ["exports", "classMembers"]
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
## Exports
|
|
341
|
+
|
|
342
|
+
### `ignoreExportsUsedInFile`
|
|
343
|
+
|
|
344
|
+
In files with multiple exports, some of them might be used only internally. If
|
|
345
|
+
these exports should not be reported, there is a `ignoreExportsUsedInFile`
|
|
346
|
+
option available. With this option enabled, when something is also no longer
|
|
347
|
+
used internally, it will be reported as unused.
|
|
348
|
+
|
|
349
|
+
```json title="knip.json"
|
|
350
|
+
{
|
|
351
|
+
"ignoreExportsUsedInFile": true
|
|
352
|
+
}
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
In a more fine-grained manner, to ignore only specific issue types:
|
|
356
|
+
|
|
357
|
+
```json title="knip.json"
|
|
358
|
+
{
|
|
359
|
+
"ignoreExportsUsedInFile": {
|
|
360
|
+
"interface": true,
|
|
361
|
+
"type": true
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
### `includeEntryExports`
|
|
367
|
+
|
|
368
|
+
By default, Knip does not report unused exports in entry files. When a
|
|
369
|
+
repository (or workspace) is self-contained or private, you may want to include
|
|
370
|
+
entry files when reporting unused exports:
|
|
371
|
+
|
|
372
|
+
```json title="knip.json"
|
|
373
|
+
{
|
|
374
|
+
"includeEntryExports": true
|
|
375
|
+
}
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
If enabled, Knip will report unused exports in entry source files. But not in
|
|
379
|
+
entry and configuration files as configured by plugins, such as `next.config.js`
|
|
380
|
+
or `src/routes/+page.svelte`.
|
|
381
|
+
|
|
382
|
+
This will also enable reporting unused members of exported classes and enums.
|
|
383
|
+
|
|
384
|
+
Set this option at root level to enable this globally, or within workspace
|
|
385
|
+
configurations individually.
|
|
386
|
+
|
|
387
|
+
## Compilers
|
|
388
|
+
|
|
389
|
+
Knip supports custom compilers to transform files before analysis.
|
|
390
|
+
|
|
391
|
+
:::note
|
|
392
|
+
|
|
393
|
+
Since compilers are functions, they can only be used in dynamic configuration
|
|
394
|
+
files (`.js` or `.ts`), not in JSON configuration files.
|
|
395
|
+
|
|
396
|
+
:::
|
|
397
|
+
|
|
398
|
+
### `compilers`
|
|
399
|
+
|
|
400
|
+
Override built-in compilers or add custom compilers for additional file types.
|
|
401
|
+
|
|
402
|
+
Also see [Compilers][10].
|
|
403
|
+
|
|
404
|
+
[1]: ../reference/dynamic-configuration.mdx
|
|
405
|
+
[2]: ../overview/configuration.md
|
|
406
|
+
[3]: ../explanations/entry-files.md
|
|
407
|
+
[4]: ../features/monorepos-and-workspaces.md
|
|
408
|
+
[5]: ../explanations/plugins.md#entry-files
|
|
409
|
+
[6]: ../explanations/plugins.md
|
|
410
|
+
[7]: ../features/rules-and-filters.md#filters
|
|
411
|
+
[8]: ./jsdoc-tsdoc-tags.md
|
|
412
|
+
[9]: ../guides/configuring-project-files.md
|
|
413
|
+
[10]: ../features/compilers.md
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Dynamic Configuration
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
import { Tabs, TabItem } from '@astrojs/starlight/components';
|
|
6
|
+
|
|
7
|
+
## TypeScript
|
|
8
|
+
|
|
9
|
+
Instead of a JSON file, you can use a JavaScript or TypeScript file for a
|
|
10
|
+
dynamic configuration and type annotations:
|
|
11
|
+
|
|
12
|
+
<Tabs syncKey="lang">
|
|
13
|
+
<TabItem label="TypeScript">
|
|
14
|
+
```ts title="knip.ts"
|
|
15
|
+
import type { KnipConfig } from 'knip';
|
|
16
|
+
|
|
17
|
+
const config: KnipConfig = {
|
|
18
|
+
entry: ['src/index.ts'],
|
|
19
|
+
project: ['src/**/*.ts'],
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default config;
|
|
23
|
+
```
|
|
24
|
+
</TabItem>
|
|
25
|
+
|
|
26
|
+
<TabItem label="JavaScript">
|
|
27
|
+
```js title="knip.js"
|
|
28
|
+
/** @type {import('knip').KnipConfig} */
|
|
29
|
+
const config = {
|
|
30
|
+
entry: ['src/index.ts'],
|
|
31
|
+
project: ['src/**/*.ts'],
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default config;
|
|
35
|
+
```
|
|
36
|
+
</TabItem>
|
|
37
|
+
</Tabs>
|
|
38
|
+
|
|
39
|
+
## Function
|
|
40
|
+
|
|
41
|
+
You can export a regular or async function that returns the configuration object
|
|
42
|
+
as well:
|
|
43
|
+
|
|
44
|
+
<Tabs syncKey="lang">
|
|
45
|
+
<TabItem label="TypeScript">
|
|
46
|
+
```ts title="knip.ts"
|
|
47
|
+
import type { KnipConfig } from 'knip';
|
|
48
|
+
|
|
49
|
+
const config = async (): Promise<KnipConfig> => {
|
|
50
|
+
const items = await fetchRepoInfo();
|
|
51
|
+
|
|
52
|
+
return {
|
|
53
|
+
entry: ['src/index.ts', ...items],
|
|
54
|
+
project: ['src/**/*.ts'],
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export default config;
|
|
59
|
+
```
|
|
60
|
+
</TabItem>
|
|
61
|
+
|
|
62
|
+
<TabItem label="JavaScript">
|
|
63
|
+
```ts title="knip.js"
|
|
64
|
+
const config = async () => ({
|
|
65
|
+
entry: ['src/index.ts'],
|
|
66
|
+
project: ['src/**/*.ts'],
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export default config;
|
|
70
|
+
```
|
|
71
|
+
</TabItem>
|
|
72
|
+
</Tabs>
|