From ab142be459f50e7cf1327b6ab1031074cf7d8e5e Mon Sep 17 00:00:00 2001 From: Lars Kappert Date: Tue, 9 Dec 2025 05:33:55 +0100 Subject: [PATCH] Move knip args (#62865) --- Herebyfile.mjs | 2 +- knip.jsonc | 3 ++- src/compiler/utilities.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Herebyfile.mjs b/Herebyfile.mjs index 0f4f8344008..aca96dc28c9 100644 --- a/Herebyfile.mjs +++ b/Herebyfile.mjs @@ -601,7 +601,7 @@ export const knip = task({ name: "knip", description: "Runs knip.", dependencies: [generateDiagnostics], - run: () => exec(process.execPath, ["node_modules/knip/bin/knip.js", "--tags=+internal,-knipignore", "--exclude=duplicates,enumMembers", ...(cmdLineOptions.fix ? ["--fix"] : [])]), + run: () => exec(process.execPath, ["node_modules/knip/bin/knip.js", ...(cmdLineOptions.fix ? ["--fix"] : [])]), }); const { main: typingsInstaller, watch: watchTypingsInstaller } = entrypointBuildTask({ diff --git a/knip.jsonc b/knip.jsonc index 5b1fa410e15..5badeb83e5c 100644 --- a/knip.jsonc +++ b/knip.jsonc @@ -1,5 +1,7 @@ { "$schema": "https://unpkg.com/knip@5/schema.json", + "exclude": ["duplicates", "enumMembers"], + "tags": ["+internal", "-knipignore"], "includeEntryExports": true, "entry": [ "Herebyfile.mjs", @@ -14,7 +16,6 @@ "src/testRunner/_namespaces/Harness.ts", // The rest of the entry files, mostly to track used dependencies: - ".eslint-plugin-local.cjs", ".gulp.js", "scripts/eslint/{rules,tests}/*.cjs", "scripts/*.{cjs,mjs}" diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index cdf898ca8c3..4939145c433 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -4792,7 +4792,7 @@ export function getTypeParameterFromJsDoc(node: TypeParameterDeclaration & { par return typeParameters && find(typeParameters, p => p.name.escapedText === name); } -/** @internal @knipignore */ +/** @internal */ export function hasTypeArguments(node: Node): node is HasTypeArguments { return !!(node as HasTypeArguments).typeArguments; }