diff --git a/packages/docs/src/content/docs/explanations/plugins.md b/packages/docs/src/content/docs/explanations/plugins.md index 623561e51..59ae68bbb 100644 --- a/packages/docs/src/content/docs/explanations/plugins.md +++ b/packages/docs/src/content/docs/explanations/plugins.md @@ -7,8 +7,9 @@ sidebar: This page describes why Knip uses plugins and the difference between `config` and `entry` files. -Knip has an extensive and growing [list of built-in plugins][1]. It's currently -not possible to add custom plugins. +Knip has an extensive and growing [list of built-in plugins][1]. Currently it's +not possible to add custom plugins, but feel free to [request a plugin][2] or +even [write a plugin][3] so others can benefit too. ## Enabled @@ -18,14 +19,14 @@ in `package.json`. For instance, if `astro` is listed in `dependencies` or ## Configuration files -Knip uses [entry files][2] as starting points to scan your source code and +Knip uses [entry files][4] as starting points to scan your source code and resolve other internal files and external dependencies. The dependency graph can be statically resolved through the `require` and `import` statements in those source files. However, configuration files reference external dependencies in various ways. Knip uses a plugin for each tool to parse configuration files and find those dependencies. -In this example we look at [Knip's ESLint plugin][3]. The default `config` file +In this example we look at [Knip's ESLint plugin][5]. The default `config` file patterns include `.eslintrc.json`. Here's a minimal example: ```json title=".eslintrc.json" @@ -164,7 +165,7 @@ jobs: From these scripts, the `scripts/build.js` and `scripts/deploy.ts` files will be added as entry files by the GitHub Actions plugin. -You can read more about this in [Script Parser][4]. +You can read more about this in [Script Parser][6]. ### webpack @@ -248,6 +249,8 @@ Plugins are configured with two distinct types of files: ::: [1]: ../reference/plugins.md -[2]: ./entry-files.md -[3]: ../reference/plugins/eslint.md -[4]: ../features/script-parser.md +[2]: https://github.com/webpro-nl/knip/issues/483 +[3]: ../guides/writing-a-plugin.md +[4]: ./entry-files.md +[5]: ../reference/plugins/eslint.md +[6]: ../features/script-parser.md diff --git a/packages/docs/src/content/docs/reference/plugins.md b/packages/docs/src/content/docs/reference/plugins.md index 392c76648..986b22bf3 100644 --- a/packages/docs/src/content/docs/reference/plugins.md +++ b/packages/docs/src/content/docs/reference/plugins.md @@ -49,7 +49,7 @@ tableOfContents: false - [Preconstruct][42] - [Prettier][43] - [React Cosmos][44] -- [Release It][45] +- [Release It!][45] - [Remark][46] - [Remix][47] - [Rollup][48] @@ -128,7 +128,7 @@ tableOfContents: false [42]: /reference/plugins/preconstruct 'Preconstruct' [43]: /reference/plugins/prettier 'Prettier' [44]: /reference/plugins/react-cosmos 'React Cosmos' -[45]: /reference/plugins/release-it 'Release It' +[45]: /reference/plugins/release-it 'Release It!' [46]: /reference/plugins/remark 'Remark' [47]: /reference/plugins/remix 'Remix' [48]: /reference/plugins/rollup 'Rollup' diff --git a/packages/knip/src/plugins/nuxt/index.ts b/packages/knip/src/plugins/nuxt/index.ts index 34f640fc4..52a28a747 100644 --- a/packages/knip/src/plugins/nuxt/index.ts +++ b/packages/knip/src/plugins/nuxt/index.ts @@ -6,6 +6,9 @@ import type { NuxtConfig } from './types.js'; const title = 'Nuxt'; +const note = `Knip works best with [explicit imports](https://nuxt.com/docs/guide/concepts/auto-imports#explicit-imports). +Nuxt allows to [disable auto-imports](https://nuxt.com/docs/guide/concepts/auto-imports#disabling-auto-imports).`; + const enablers = ['nuxt']; const isEnabled: IsPluginEnabled = ({ dependencies }) => { @@ -52,6 +55,7 @@ const resolveEntryPaths: ResolveEntryPaths = async localConfig => { export default { title, + note, enablers, isEnabled, entry, diff --git a/packages/knip/src/plugins/release-it/index.ts b/packages/knip/src/plugins/release-it/index.ts index d8fcba644..3f61bd6a1 100644 --- a/packages/knip/src/plugins/release-it/index.ts +++ b/packages/knip/src/plugins/release-it/index.ts @@ -6,7 +6,7 @@ import type { ReleaseItConfig } from './types.js'; // Uses CosmiConfig but with custom searchPlaces // https://github.com/release-it/release-it/blob/main/lib/config.js -const title = 'Release It'; +const title = 'Release It!'; const enablers = ['release-it'];