Move knip args (#62865)

This commit is contained in:
Lars Kappert 2025-12-09 05:33:55 +01:00 committed by GitHub
parent c21f73fd4e
commit ab142be459
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 3 deletions

View File

@ -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({

View File

@ -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}"

View File

@ -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;
}