From caaf45bb203bce20ac1f5bddc4f0164d99f79e6b Mon Sep 17 00:00:00 2001 From: Zamiell <5511220+Zamiell@users.noreply.github.com> Date: Sat, 7 Sep 2024 06:36:06 -0400 Subject: [PATCH 1/2] chore: update config --- packages/docs/src/content/docs/overview/configuration.md | 6 ++++++ .../src/content/docs/reference/dynamic-configuration.mdx | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/docs/src/content/docs/overview/configuration.md b/packages/docs/src/content/docs/overview/configuration.md index a55bfcdab..6f9733151 100644 --- a/packages/docs/src/content/docs/overview/configuration.md +++ b/packages/docs/src/content/docs/overview/configuration.md @@ -48,6 +48,8 @@ To use a different file path: knip --config path/to/knip.json ``` +If you want to use a TypeScript or a JavaScript configuration file instead of JSON, then see [the dynamic configuration page](../reference/dynamic-configuration.mdx). + ## Customize Your project structure may not match the default `entry` and `project` files. @@ -82,6 +84,10 @@ many more. Knip looks in many places for entry files. Learn more about this in the next page about [entry files][2]. +## Configuration Options + +See the [configuration reference documentation](../reference/configuration.md). + ## What's next? The best way to understand Knip and what it can do for you is to read the pages diff --git a/packages/docs/src/content/docs/reference/dynamic-configuration.mdx b/packages/docs/src/content/docs/reference/dynamic-configuration.mdx index e44b10277..94ba20be7 100644 --- a/packages/docs/src/content/docs/reference/dynamic-configuration.mdx +++ b/packages/docs/src/content/docs/reference/dynamic-configuration.mdx @@ -6,7 +6,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; ## TypeScript -Instead of `knip.json`, you can use a JavaScript or TypeScript file for a +Instead of `knip.json`, you can use a TypeScript or JavaScript file for a dynamic configuration and type annotations: @@ -28,6 +28,7 @@ dynamic configuration and type annotations: ```js title="knip.js" + /** @type {import('knip').KnipConfig} */ const config = { entry: ['src/index.ts'], project: ['src/**/*.ts'], From 68d3ca40d02a638d270bfa3221af4dbd51b4b18f Mon Sep 17 00:00:00 2001 From: James <5511220+Zamiell@users.noreply.github.com> Date: Mon, 9 Sep 2024 12:52:55 -0400 Subject: [PATCH 2/2] Update configuration.md --- packages/docs/src/content/docs/overview/configuration.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/docs/src/content/docs/overview/configuration.md b/packages/docs/src/content/docs/overview/configuration.md index 68c6b773e..1780c4a32 100644 --- a/packages/docs/src/content/docs/overview/configuration.md +++ b/packages/docs/src/content/docs/overview/configuration.md @@ -48,8 +48,6 @@ If you want to use a custom file name or path, use the `--config` flag: knip --config path/to/knip.json ``` -If you want to use a TypeScript or a JavaScript configuration file instead of JSON, then see [the dynamic configuration page](../reference/dynamic-configuration.mdx). - ## Customize Your project structure may not match the default `entry` and `project` files.