Skip to content

Commit 5e54e1d

Browse files
committed
Remove links to closed "request plugin" issue
1 parent 9c82470 commit 5e54e1d

File tree

2 files changed

+62
-64
lines changed

2 files changed

+62
-64
lines changed

packages/docs/src/content/docs/explanations/plugins.md

+16-17
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This page describes why Knip uses plugins and the difference between `config`
88
and `entry` files.
99

1010
Knip has an extensive and growing [list of built-in plugins][1]. Feel free to
11-
[request a plugin][2] or even [write a plugin][3] so others can benefit too!
11+
[write a plugin][2] so others can benefit too!
1212

1313
## What does a plugin do?
1414

@@ -17,13 +17,13 @@ in `package.json`. For instance, if `astro` is listed in `dependencies` or
1717
`devDependencies`, then the Astro plugin is enabled. And this means that this
1818
plugin will:
1919

20-
- Handle [configuration files][4] like `astro.config.mjs`
21-
- Add [entry files][5] such as `src/pages/**/*.astro`
22-
- Define [command-line arguments][6]
20+
- Handle [configuration files][3] like `astro.config.mjs`
21+
- Add [entry files][4] such as `src/pages/**/*.astro`
22+
- Define [command-line arguments][5]
2323

2424
## Configuration files
2525

26-
Knip uses [entry files][7] as starting points to scan your source code and
26+
Knip uses [entry files][6] as starting points to scan your source code and
2727
resolve other internal files and external dependencies. The dependency graph can
2828
be statically resolved through the `require` and `import` statements in those
2929
source files. However, configuration files reference external dependencies in
@@ -32,7 +32,7 @@ find those dependencies.
3232

3333
### Example: ESLint
3434

35-
In the first example we look at [the ESLint plugin][8]. The default `config`
35+
In the first example we look at [the ESLint plugin][7]. The default `config`
3636
file patterns include `.eslintrc.json`. Here's a minimal example:
3737

3838
```json title=".eslintrc.json"
@@ -57,7 +57,7 @@ as unlisted. And vice versa, if there are any ESLint plugins listed in
5757

5858
### Example: Vitest
5959

60-
The second example uses [the Vitest plugin][8]. Here's a minimal example of a
60+
The second example uses [the Vitest plugin][7]. Here's a minimal example of a
6161
Vitest configuration file:
6262

6363
```ts title="vitest.config.ts"
@@ -211,7 +211,7 @@ added as entry files by the GitHub Actions plugin.
211211
Additionally, the file `e2e/playwright.web.config.ts` is detected and will be
212212
handed over as a Playwright configuration file.
213213

214-
Read more about this in [command-line arguments][6].
214+
Read more about this in [command-line arguments][5].
215215

216216
### webpack
217217

@@ -293,7 +293,7 @@ node --loader tsx scripts/deploy.ts
293293
playwright test -c playwright.web.config.ts
294294
```
295295

296-
Please see [script parser][9] for more details.
296+
Please see [script parser][8] for more details.
297297

298298
## Summary
299299

@@ -309,11 +309,10 @@ Plugins are configured with two distinct types of files:
309309
:::
310310

311311
[1]: ../reference/plugins.md
312-
[2]: https://github.com/webpro-nl/knip/issues/483
313-
[3]: ../guides/writing-a-plugin.md
314-
[4]: #configuration-files
315-
[5]: #entry-files
316-
[6]: #command-line-arguments
317-
[7]: ./entry-files.md
318-
[8]: ../reference/plugins/eslint.md
319-
[9]: ../features/script-parser.md
312+
[2]: ../guides/writing-a-plugin.md
313+
[3]: #configuration-files
314+
[4]: #entry-files
315+
[5]: #command-line-arguments
316+
[6]: ./entry-files.md
317+
[7]: ../reference/plugins/eslint.md
318+
[8]: ../features/script-parser.md

packages/docs/src/content/docs/guides/handling-issues.mdx

+46-47
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,15 @@ example,
119119
reported as unused.
120120

121121
Solution: [create a new plugin][13] for the tool or framework that's not [in the
122-
list][14] yet, or [request it][15]. Or work around it and add `entry` patterns
123-
and maybe ignore a dependency or two.
122+
list][14] yet. Or work around it and add `entry` patterns and maybe ignore a
123+
dependency or two.
124124

125125
### Incomplete plugin
126126

127127
Files may be reported as unused if existing plugins do not include that entry
128-
file pattern yet. See the [plugins section of entry files][16] for more details.
128+
file pattern yet. See the [plugins section of entry files][15] for more details.
129129

130-
Solution: [override plugin configuration][17] to customize default patterns for
130+
Solution: [override plugin configuration][16] to customize default patterns for
131131
existing plugins. Or even better: send a pull request to improve the plugin.
132132

133133
### Integrated monorepos
@@ -136,7 +136,7 @@ Multiple instances of configuration files like `.eslintrc` and
136136
`jest.config.json` across the repository may be reported as unused when working
137137
in a (mono)repo with a single `package.json`.
138138

139-
Solution: see [integrated monorepos][18] for more details and how to configure
139+
Solution: see [integrated monorepos][17] for more details and how to configure
140140
plugins to target those configuration files.
141141

142142
### Build artifacts and ignored files
@@ -174,13 +174,13 @@ negated `project` patterns:
174174

175175
First off: dependencies imported in unused files are reported as unused
176176
dependencies. That's why it's strongly recommended to try and remedy [unused
177-
files][19] first. Better `entry` and `project` file coverage will solve many
177+
files][18] first. Better `entry` and `project` file coverage will solve many
178178
cases of reported unused dependencies.
179179

180180
The most common causes for unused and unlisted dependencies include:
181181

182-
- [Missing or incomplete plugin][20]
183-
- [Unreachable code][21]
182+
- [Missing or incomplete plugin][19]
183+
- [Unreachable code][20]
184184

185185
:::caution[Monorepo]
186186

@@ -221,7 +221,7 @@ plugin could solve it, a last resort is to ignore it:
221221
```
222222

223223
If a binary (or "executable") is referenced you'll want to use `ignoreBinaries`
224-
instead. See [unlisted binaries][22].
224+
instead. See [unlisted binaries][21].
225225

226226
### Types packages
227227

@@ -246,7 +246,7 @@ workspaces in a monorepo. This is an issue since we can't "assign" dependencies
246246
to other workspaces and incorrectly end up having "unlisted dependencies".
247247

248248
Most notably, tools like TypeScript, Jest and legacy ESLint suffer from this.
249-
The new [ESLint flat config system][23] does not have this issue, so it's
249+
The new [ESLint flat config system][22] does not have this issue, so it's
250250
recommended to migrate if you haven't already.
251251

252252
## Unlisted dependencies
@@ -276,7 +276,7 @@ installed that includes that binary. It looks up the `bin` field in the
276276
reported as an unlisted binary as there is no package listed that contains it.
277277

278278
Except for binaries that are most likely meant to be installed on the OS already
279-
and not installed from npm (details: [list in source][24]).
279+
and not installed from npm (details: [list in source][23]).
280280

281281
### Missing binaries
282282

@@ -287,7 +287,7 @@ dependencies and binaries, or by not running Knip from the root of the
287287
repository.
288288

289289
Solution: run Knip from the project root. From there you can [lint individual
290-
workspaces][25].
290+
workspaces][24].
291291

292292
### Example
293293

@@ -329,8 +329,8 @@ By default, Knip does not report unused exports of `entry` files.
329329

330330
The most common causes for unused exports include:
331331

332-
- [Enumerations][26]
333-
- [External libraries][27]
332+
- [Enumerations][25]
333+
- [External libraries][26]
334334

335335
Use the `--exports` flag to [filter][10] and focus on issues related to exports:
336336

@@ -372,7 +372,7 @@ implicitly referenced in an enumeration like the following example:
372372
</TabItem>
373373
</Tabs>
374374

375-
See [namepace imports][28] to see what patterns Knip does consider to be used
375+
See [namepace imports][27] to see what patterns Knip does consider to be used
376376
exports.
377377

378378
### External libraries
@@ -413,22 +413,22 @@ Knip does not include external type definitions by default so it won't see the
413413
export being referenced.
414414

415415
To include the type definitions of external libraries, use the
416-
[--include-libs][29] flag:
416+
[--include-libs][28] flag:
417417

418418
```shell
419419
knip --include-libs
420420
```
421421

422422
This comes at a performance and memory penalty, but should give better results
423-
if you need it. This flag is implied when [classMembers][30] are included (that
423+
if you need it. This flag is implied when [classMembers][29] are included (that
424424
feature comes with roughly the same performance penalty).
425425

426426
### Exclude exports from the report
427427

428428
To exclude unused exports from the report, there are a few options:
429429

430-
- [Ignore exports used in file][31] for exports used internally.
431-
- Individual exports can be [tagged using JSDoc syntax][32].
430+
- [Ignore exports used in file][30] for exports used internally.
431+
- Individual exports can be [tagged using JSDoc syntax][31].
432432
- Have the export in an entry file:
433433
- Add the file to the `entry` file patterns array in the configuration.
434434
- Move the export(s) to an entry file.
@@ -438,7 +438,7 @@ To exclude unused exports from the report, there are a few options:
438438
## Missing exports?
439439

440440
Did you expect certain exports in the report, but are they missing? They might
441-
be exported from an entry file. In that case, use [--include-entry-exports][33]
441+
be exported from an entry file. In that case, use [--include-entry-exports][32]
442442
to make Knip also report unused exports in entry files.
443443

444444
The exports of non-standard extensions like `.astro`, `.mdx`, `.vue` or
@@ -456,10 +456,10 @@ knip --include classMembers
456456
This option is also available in the Knip configuration file. Note that this
457457
feature comes at a cost: linting will take more time and more memory.
458458

459-
Individual class members can be [tagged using JSDoc syntax][32].
459+
Individual class members can be [tagged using JSDoc syntax][31].
460460

461461
Classes exported from entry files are ignored, and so are their members. Use
462-
[--include-entry-exports][33] to make Knip also report members of unused exports
462+
[--include-entry-exports][32] to make Knip also report members of unused exports
463463
in entry files.
464464

465465
## Enum members
@@ -471,18 +471,18 @@ members can also be disabled altogether, for example:
471471
knip --exclude enumMembers
472472
```
473473

474-
Individual enum members can be [tagged using JSDoc syntax][32].
474+
Individual enum members can be [tagged using JSDoc syntax][31].
475475

476476
Enums exported from entry files are ignored, and so are their members. Use
477-
[--include-entry-exports][33] to make Knip also report members of unused exports
477+
[--include-entry-exports][32] to make Knip also report members of unused exports
478478
in entry files.
479479

480480
## Feedback or false positives?
481481

482482
If you believe Knip incorrectly reports something as unused (i.e. there's a
483-
false positive), feel free to create a [minimal reproduction][34] and open an
483+
false positive), feel free to create a [minimal reproduction][33] and open an
484484
issue on GitHub. It'll make Knip better for everyone! Join the [Discord
485-
channel][35] to discuss any feedback or questions you may have.
485+
channel][34] to discuss any feedback or questions you may have.
486486

487487
[1]: #dynamic-import-specifiers
488488
[2]: #unsupported-arguments-in-scripts
@@ -498,25 +498,24 @@ channel][35] to discuss any feedback or questions you may have.
498498
[12]: ../features/compilers.md
499499
[13]: ./writing-a-plugin.md
500500
[14]: ../reference/plugins.md
501-
[15]: https://github.com/webpro-nl/knip/issues/483
502-
[16]: ../explanations/plugins.md#entry-files
503-
[17]: ../explanations/entry-files.md#plugins
504-
[18]: ../features/integrated-monorepos.md
505-
[19]: #unused-files
506-
[20]: #missing-or-incomplete-plugin
507-
[21]: #unreachable-code
508-
[22]: #unlisted-binaries
509-
[23]: https://eslint.org/docs/latest/use/configure/configuration
510-
[24]:
501+
[15]: ../explanations/plugins.md#entry-files
502+
[16]: ../explanations/entry-files.md#plugins
503+
[17]: ../features/integrated-monorepos.md
504+
[18]: #unused-files
505+
[19]: #missing-or-incomplete-plugin
506+
[20]: #unreachable-code
507+
[21]: #unlisted-binaries
508+
[22]: https://eslint.org/docs/latest/use/configure/configuration
509+
[23]:
511510
https://github.com/webpro-nl/knip/blob/6f561ff09b4f1bf36585b64210ee34ea27ae04ea/packages/knip/src/constants.ts#L32-L133
512-
[25]: ../features/monorepos-and-workspaces.md#lint-a-single-workspace
513-
[26]: #enumerations
514-
[27]: #external-libraries
515-
[28]: ../guides/namespace-imports.md
516-
[29]: ../reference/cli#--include-libs
517-
[30]: #class-members
518-
[31]: ../reference/configuration.md#ignoreexportsusedinfile
519-
[32]: ../reference/jsdoc-tsdoc-tags.md
520-
[33]: ../reference/configuration.md#includeentryexports
521-
[34]: ../guides/issue-reproduction
522-
[35]: https://discord.gg/r5uXTtbTpc
511+
[24]: ../features/monorepos-and-workspaces.md#lint-a-single-workspace
512+
[25]: #enumerations
513+
[26]: #external-libraries
514+
[27]: ../guides/namespace-imports.md
515+
[28]: ../reference/cli#--include-libs
516+
[29]: #class-members
517+
[30]: ../reference/configuration.md#ignoreexportsusedinfile
518+
[31]: ../reference/jsdoc-tsdoc-tags.md
519+
[32]: ../reference/configuration.md#includeentryexports
520+
[33]: ../guides/issue-reproduction
521+
[34]: https://discord.gg/r5uXTtbTpc

0 commit comments

Comments
 (0)