knip 5.46.5 → 5.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist/ConfigurationChief.d.ts +4 -0
  2. package/dist/ProjectPrincipal.d.ts +2 -2
  3. package/dist/ProjectPrincipal.js +9 -7
  4. package/dist/WorkspaceWorker.d.ts +10 -9
  5. package/dist/WorkspaceWorker.js +101 -74
  6. package/dist/binaries/package-manager/pnpm.js +1 -0
  7. package/dist/cli.js +2 -2
  8. package/dist/compilers/index.d.ts +41 -0
  9. package/dist/graph/analyze.js +0 -2
  10. package/dist/graph/build.js +13 -10
  11. package/dist/plugins/astro/index.d.ts +1 -0
  12. package/dist/plugins/astro/index.js +3 -1
  13. package/dist/plugins/ava/index.js +1 -1
  14. package/dist/plugins/github-action/index.d.ts +9 -0
  15. package/dist/plugins/github-action/index.js +28 -0
  16. package/dist/plugins/github-actions/index.d.ts +2 -1
  17. package/dist/plugins/github-actions/index.js +1 -1
  18. package/dist/plugins/husky/index.js +1 -1
  19. package/dist/plugins/index.d.ts +34 -2
  20. package/dist/plugins/index.js +8 -0
  21. package/dist/plugins/jest/index.js +3 -1
  22. package/dist/plugins/karma/helpers.js +4 -4
  23. package/dist/plugins/lint-staged/index.js +2 -0
  24. package/dist/plugins/next/index.d.ts +3 -2
  25. package/dist/plugins/next/index.js +19 -8
  26. package/dist/plugins/next/resolveFromAST.d.ts +2 -0
  27. package/dist/plugins/next/resolveFromAST.js +15 -0
  28. package/dist/plugins/nodemon/index.js +1 -1
  29. package/dist/plugins/nuxt/index.d.ts +1 -1
  30. package/dist/plugins/nuxt/index.js +2 -2
  31. package/dist/plugins/playwright/index.js +1 -3
  32. package/dist/plugins/react-router/index.js +3 -1
  33. package/dist/plugins/sst/index.d.ts +9 -0
  34. package/dist/plugins/sst/index.js +17 -0
  35. package/dist/plugins/sst/resolveFromAST.d.ts +2 -0
  36. package/dist/plugins/sst/resolveFromAST.js +47 -0
  37. package/dist/plugins/starlight/index.d.ts +9 -0
  38. package/dist/plugins/starlight/index.js +18 -0
  39. package/dist/plugins/starlight/resolveFromAST.d.ts +2 -0
  40. package/dist/plugins/starlight/resolveFromAST.js +20 -0
  41. package/dist/plugins/storybook/index.js +4 -1
  42. package/dist/plugins/tanstack-router/index.d.ts +12 -0
  43. package/dist/plugins/tanstack-router/index.js +46 -0
  44. package/dist/plugins/tanstack-router/resolveFromAST.d.ts +2 -0
  45. package/dist/plugins/tanstack-router/resolveFromAST.js +28 -0
  46. package/dist/plugins/tanstack-router/types.d.ts +7 -0
  47. package/dist/plugins/tanstack-router/types.js +1 -0
  48. package/dist/plugins/vitest/index.js +12 -1
  49. package/dist/plugins/vitest/types.d.ts +5 -0
  50. package/dist/plugins/vue/index.js +2 -2
  51. package/dist/plugins/webpack/index.js +2 -2
  52. package/dist/reporters/codeowners.js +8 -6
  53. package/dist/reporters/json.js +3 -3
  54. package/dist/schema/configuration.d.ts +228 -1
  55. package/dist/schema/configuration.js +3 -1
  56. package/dist/schema/plugins.d.ts +92 -0
  57. package/dist/schema/plugins.js +4 -0
  58. package/dist/types/PluginNames.d.ts +2 -2
  59. package/dist/types/PluginNames.js +4 -0
  60. package/dist/types/config.d.ts +8 -0
  61. package/dist/typescript/ast-helpers.d.ts +4 -0
  62. package/dist/typescript/ast-helpers.js +62 -0
  63. package/dist/typescript/create-hosts.d.ts +3 -2
  64. package/dist/typescript/create-hosts.js +1 -3
  65. package/dist/util/Performance.js +7 -7
  66. package/dist/util/codeowners.d.ts +2 -0
  67. package/dist/util/codeowners.js +32 -0
  68. package/dist/util/errors.d.ts +1 -1
  69. package/dist/util/errors.js +2 -2
  70. package/dist/util/input.d.ts +3 -2
  71. package/dist/util/input.js +2 -1
  72. package/dist/util/math.d.ts +6 -0
  73. package/dist/util/math.js +11 -0
  74. package/dist/util/plugin.d.ts +0 -2
  75. package/dist/util/plugin.js +1 -14
  76. package/dist/version.d.ts +1 -1
  77. package/dist/version.js +1 -1
  78. package/package.json +4 -6
  79. package/schema.json +16 -0
@@ -0,0 +1,28 @@
1
+ import ts from 'typescript';
2
+ import { getPropertyValueEntries } from '../../typescript/ast-helpers.js';
3
+ const CONFIG_KEYS = new Set([
4
+ 'routeFilePrefix',
5
+ 'routeFileIgnorePrefix',
6
+ 'routeFileIgnorePattern',
7
+ 'routesDirectory',
8
+ 'generatedRouteTree',
9
+ ]);
10
+ const FUNCTIONS = new Set(['TanStackRouterVite', 'TanStackRouterRspack', 'TanStackRouterWebpack']);
11
+ export const getCustomConfig = (sourceFile) => {
12
+ const config = {};
13
+ function visit(node) {
14
+ if (ts.isCallExpression(node)) {
15
+ const callee = node.expression;
16
+ if (ts.isIdentifier(callee) && FUNCTIONS.has(callee.text)) {
17
+ const firstArg = node.arguments[0];
18
+ if (ts.isObjectLiteralExpression(firstArg)) {
19
+ for (const [key, value] of getPropertyValueEntries(firstArg, CONFIG_KEYS))
20
+ config[key] = value;
21
+ }
22
+ }
23
+ }
24
+ ts.forEachChild(node, visit);
25
+ }
26
+ visit(sourceFile);
27
+ return config;
28
+ };
@@ -0,0 +1,7 @@
1
+ export type TanstackRouterConfig = {
2
+ routeFilePrefix?: string;
3
+ routeFileIgnorePrefix?: string;
4
+ routeFileIgnorePattern?: string;
5
+ routesDirectory?: string;
6
+ generatedRouteTree?: string;
7
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -25,7 +25,18 @@ const findConfigDependencies = (localConfig, options) => {
25
25
  const dir = join(configFileDir, testConfig.root ?? '.');
26
26
  const setupFiles = [testConfig.setupFiles ?? []].flat().map(specifier => ({ ...toDeferResolve(specifier), dir }));
27
27
  const globalSetup = [testConfig.globalSetup ?? []].flat().map(specifier => ({ ...toDeferResolve(specifier), dir }));
28
- return [...[...environments, ...reporters, ...coverage].map(id => toDependency(id)), ...setupFiles, ...globalSetup];
28
+ const workspaceDependencies = [];
29
+ if (testConfig.workspace !== undefined) {
30
+ for (const workspaceConfig of testConfig.workspace) {
31
+ workspaceDependencies.push(...findConfigDependencies(workspaceConfig, options));
32
+ }
33
+ }
34
+ return [
35
+ ...[...environments, ...reporters, ...coverage].map(id => toDependency(id)),
36
+ ...setupFiles,
37
+ ...globalSetup,
38
+ ...workspaceDependencies,
39
+ ];
29
40
  };
30
41
  const getConfigs = async (localConfig) => {
31
42
  const configs = [];
@@ -10,6 +10,11 @@ interface VitestConfig {
10
10
  globalSetup?: string | string[];
11
11
  reporters?: (string | [string, unknown] | unknown)[];
12
12
  setupFiles?: string | string[];
13
+ workspace?: (ViteConfig & {
14
+ test: VitestConfig['test'] & {
15
+ workspace: never;
16
+ };
17
+ })[];
13
18
  };
14
19
  }
15
20
  export interface ViteConfig extends VitestConfig {
@@ -1,4 +1,4 @@
1
- import { toDevDependency } from '../../util/input.js';
1
+ import { toDependency } from '../../util/input.js';
2
2
  import { hasDependency } from '../../util/plugin.js';
3
3
  import { findWebpackDependenciesFromConfig } from '../webpack/index.js';
4
4
  const title = 'Vue';
@@ -26,7 +26,7 @@ const resolveConfig = async (config, options) => {
26
26
  }
27
27
  if (manifest.scripts &&
28
28
  Object.values(manifest.scripts).some(script => /(?<=^|\s)vue-cli-service(\s|\s.+\s)lint(?=\s|$)/.test(script))) {
29
- inputs.push(toDevDependency('@vue/cli-plugin-eslint'));
29
+ inputs.push(toDependency('@vue/cli-plugin-eslint'));
30
30
  }
31
31
  return inputs;
32
32
  };
@@ -1,5 +1,5 @@
1
1
  import { compact } from '../../util/array.js';
2
- import { toDeferResolve, toDeferResolveEntry, toDeferResolveProductionEntry, toDependency, toDevDependency, } from '../../util/input.js';
2
+ import { toDeferResolve, toDeferResolveEntry, toDeferResolveProductionEntry, toDependency, } from '../../util/input.js';
3
3
  import { isInternal } from '../../util/path.js';
4
4
  import { hasDependency } from '../../util/plugin.js';
5
5
  import { getDependenciesFromConfig } from '../babel/index.js';
@@ -109,7 +109,7 @@ const resolveConfig = async (localConfig, options) => {
109
109
  const scripts = Object.values(manifest.scripts ?? {});
110
110
  const webpackCLI = scripts.some(script => script && /(?<=^|\s)webpack(?=\s|$)/.test(script)) ? ['webpack-cli'] : [];
111
111
  const webpackDevServer = scripts.some(script => script?.includes('webpack serve')) ? ['webpack-dev-server'] : [];
112
- return compact([...inputs, [...webpackCLI, ...webpackDevServer].map(toDevDependency)].flat());
112
+ return compact([...inputs, ...[...webpackCLI, ...webpackDevServer].map(id => toDependency(id))]);
113
113
  };
114
114
  const args = {
115
115
  binaries: ['webpack', 'webpack-dev-server'],
@@ -1,5 +1,5 @@
1
- import { OwnershipEngine } from '@snyk/github-codeowners/dist/lib/ownership/index.js';
2
1
  import picocolors from 'picocolors';
2
+ import { createOwnershipEngine } from '../util/codeowners.js';
3
3
  import { relative, resolve, toRelative } from '../util/path.js';
4
4
  import { getTitle, logIssueLine, logTitle } from './util.js';
5
5
  const logIssueSet = (issues) => {
@@ -22,13 +22,15 @@ export default ({ report, issues, isShowProgress, options }) => {
22
22
  console.error(error);
23
23
  }
24
24
  const codeownersFilePath = resolve(opts.path ?? '.github/CODEOWNERS');
25
- const codeownersEngine = OwnershipEngine.FromCodeownersFile(codeownersFilePath);
25
+ const findOwners = createOwnershipEngine(codeownersFilePath);
26
26
  const reportMultipleGroups = Object.values(report).filter(Boolean).length > 1;
27
- const [dependenciesOwner = '[no-owner]'] = codeownersEngine.calcFileOwnership('package.json');
28
- const fallbackOwner = dependenciesOwner;
27
+ const [dependenciesOwner = '[no-owner]'] = findOwners('package.json');
29
28
  let totalIssues = 0;
30
- const calcFileOwnership = (filePath) => codeownersEngine.calcFileOwnership(relative(filePath))[0] ?? fallbackOwner;
31
- const addOwner = (issue) => ({ ...issue, owner: calcFileOwnership(issue.filePath) });
29
+ const calcFileOwnership = (filePath) => findOwners(relative(filePath))[0] ?? dependenciesOwner;
30
+ const addOwner = (issue) => ({
31
+ ...issue,
32
+ owner: calcFileOwnership(issue.filePath),
33
+ });
32
34
  for (const [reportType, isReportType] of Object.entries(report)) {
33
35
  if (isReportType) {
34
36
  const title = reportMultipleGroups && getTitle(reportType);
@@ -1,4 +1,4 @@
1
- import { OwnershipEngine } from '@snyk/github-codeowners/dist/lib/ownership/index.js';
1
+ import { createOwnershipEngine } from '../util/codeowners.js';
2
2
  import { isFile } from '../util/fs.js';
3
3
  import { relative, resolve } from '../util/path.js';
4
4
  import { convert } from './util.js';
@@ -12,13 +12,13 @@ export default async ({ report, issues, options }) => {
12
12
  }
13
13
  const json = {};
14
14
  const codeownersFilePath = resolve(opts.codeowners ?? '.github/CODEOWNERS');
15
- const codeownersEngine = isFile(codeownersFilePath) && OwnershipEngine.FromCodeownersFile(codeownersFilePath);
15
+ const findOwners = isFile(codeownersFilePath) && createOwnershipEngine(codeownersFilePath);
16
16
  const flatten = (issues) => Object.values(issues).flatMap(Object.values);
17
17
  const initRow = (filePath) => {
18
18
  const file = relative(filePath);
19
19
  const row = {
20
20
  file,
21
- ...(codeownersEngine && { owners: codeownersEngine.calcFileOwnership(file) }),
21
+ ...(findOwners && { owners: findOwners(file).map(name => ({ name })) }),
22
22
  ...(report.dependencies && { dependencies: [] }),
23
23
  ...(report.devDependencies && { devDependencies: [] }),
24
24
  ...(report.optionalPeerDependencies && { optionalPeerDependencies: [] }),
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
3
+ $schema: z.ZodOptional<z.ZodString>;
3
4
  rules: z.ZodOptional<z.ZodRecord<z.ZodUnion<[z.ZodLiteral<"files">, z.ZodLiteral<"dependencies">, z.ZodLiteral<"devDependencies">, z.ZodLiteral<"optionalPeerDependencies">, z.ZodLiteral<"unlisted">, z.ZodLiteral<"binaries">, z.ZodLiteral<"unresolved">, z.ZodLiteral<"exports">, z.ZodLiteral<"types">, z.ZodLiteral<"nsExports">, z.ZodLiteral<"nsTypes">, z.ZodLiteral<"duplicates">, z.ZodLiteral<"enumMembers">, z.ZodLiteral<"classMembers">]>, z.ZodEnum<["error", "warn", "off"]>>>;
4
5
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
5
6
  project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -278,6 +279,19 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
278
279
  entry?: string | string[] | undefined;
279
280
  project?: string | string[] | undefined;
280
281
  }>]>>;
282
+ 'github-action': z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
283
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
284
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
285
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
286
+ }, "strip", z.ZodTypeAny, {
287
+ config?: string | string[] | undefined;
288
+ entry?: string | string[] | undefined;
289
+ project?: string | string[] | undefined;
290
+ }, {
291
+ config?: string | string[] | undefined;
292
+ entry?: string | string[] | undefined;
293
+ project?: string | string[] | undefined;
294
+ }>]>>;
281
295
  'github-actions': z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
282
296
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
283
297
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -876,6 +890,32 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
876
890
  entry?: string | string[] | undefined;
877
891
  project?: string | string[] | undefined;
878
892
  }>]>>;
893
+ sst: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
894
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
895
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
896
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
897
+ }, "strip", z.ZodTypeAny, {
898
+ config?: string | string[] | undefined;
899
+ entry?: string | string[] | undefined;
900
+ project?: string | string[] | undefined;
901
+ }, {
902
+ config?: string | string[] | undefined;
903
+ entry?: string | string[] | undefined;
904
+ project?: string | string[] | undefined;
905
+ }>]>>;
906
+ starlight: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
907
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
908
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
909
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
910
+ }, "strip", z.ZodTypeAny, {
911
+ config?: string | string[] | undefined;
912
+ entry?: string | string[] | undefined;
913
+ project?: string | string[] | undefined;
914
+ }, {
915
+ config?: string | string[] | undefined;
916
+ entry?: string | string[] | undefined;
917
+ project?: string | string[] | undefined;
918
+ }>]>>;
879
919
  storybook: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
880
920
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
881
921
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -954,6 +994,19 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
954
994
  entry?: string | string[] | undefined;
955
995
  project?: string | string[] | undefined;
956
996
  }>]>>;
997
+ 'tanstack-router': z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
998
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
999
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1000
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1001
+ }, "strip", z.ZodTypeAny, {
1002
+ config?: string | string[] | undefined;
1003
+ entry?: string | string[] | undefined;
1004
+ project?: string | string[] | undefined;
1005
+ }, {
1006
+ config?: string | string[] | undefined;
1007
+ entry?: string | string[] | undefined;
1008
+ project?: string | string[] | undefined;
1009
+ }>]>>;
957
1010
  travis: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
958
1011
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
959
1012
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -1317,6 +1370,11 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
1317
1370
  entry?: string | string[] | undefined;
1318
1371
  project?: string | string[] | undefined;
1319
1372
  } | undefined;
1373
+ 'github-action'?: string | boolean | string[] | {
1374
+ config?: string | string[] | undefined;
1375
+ entry?: string | string[] | undefined;
1376
+ project?: string | string[] | undefined;
1377
+ } | undefined;
1320
1378
  'github-actions'?: string | boolean | string[] | {
1321
1379
  config?: string | string[] | undefined;
1322
1380
  entry?: string | string[] | undefined;
@@ -1542,6 +1600,16 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
1542
1600
  entry?: string | string[] | undefined;
1543
1601
  project?: string | string[] | undefined;
1544
1602
  } | undefined;
1603
+ sst?: string | boolean | string[] | {
1604
+ config?: string | string[] | undefined;
1605
+ entry?: string | string[] | undefined;
1606
+ project?: string | string[] | undefined;
1607
+ } | undefined;
1608
+ starlight?: string | boolean | string[] | {
1609
+ config?: string | string[] | undefined;
1610
+ entry?: string | string[] | undefined;
1611
+ project?: string | string[] | undefined;
1612
+ } | undefined;
1545
1613
  storybook?: string | boolean | string[] | {
1546
1614
  config?: string | string[] | undefined;
1547
1615
  entry?: string | string[] | undefined;
@@ -1572,6 +1640,11 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
1572
1640
  entry?: string | string[] | undefined;
1573
1641
  project?: string | string[] | undefined;
1574
1642
  } | undefined;
1643
+ 'tanstack-router'?: string | boolean | string[] | {
1644
+ config?: string | string[] | undefined;
1645
+ entry?: string | string[] | undefined;
1646
+ project?: string | string[] | undefined;
1647
+ } | undefined;
1575
1648
  travis?: string | boolean | string[] | {
1576
1649
  config?: string | string[] | undefined;
1577
1650
  entry?: string | string[] | undefined;
@@ -1782,6 +1855,11 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
1782
1855
  entry?: string | string[] | undefined;
1783
1856
  project?: string | string[] | undefined;
1784
1857
  } | undefined;
1858
+ 'github-action'?: string | boolean | string[] | {
1859
+ config?: string | string[] | undefined;
1860
+ entry?: string | string[] | undefined;
1861
+ project?: string | string[] | undefined;
1862
+ } | undefined;
1785
1863
  'github-actions'?: string | boolean | string[] | {
1786
1864
  config?: string | string[] | undefined;
1787
1865
  entry?: string | string[] | undefined;
@@ -2007,6 +2085,16 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
2007
2085
  entry?: string | string[] | undefined;
2008
2086
  project?: string | string[] | undefined;
2009
2087
  } | undefined;
2088
+ sst?: string | boolean | string[] | {
2089
+ config?: string | string[] | undefined;
2090
+ entry?: string | string[] | undefined;
2091
+ project?: string | string[] | undefined;
2092
+ } | undefined;
2093
+ starlight?: string | boolean | string[] | {
2094
+ config?: string | string[] | undefined;
2095
+ entry?: string | string[] | undefined;
2096
+ project?: string | string[] | undefined;
2097
+ } | undefined;
2010
2098
  storybook?: string | boolean | string[] | {
2011
2099
  config?: string | string[] | undefined;
2012
2100
  entry?: string | string[] | undefined;
@@ -2037,6 +2125,11 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
2037
2125
  entry?: string | string[] | undefined;
2038
2126
  project?: string | string[] | undefined;
2039
2127
  } | undefined;
2128
+ 'tanstack-router'?: string | boolean | string[] | {
2129
+ config?: string | string[] | undefined;
2130
+ entry?: string | string[] | undefined;
2131
+ project?: string | string[] | undefined;
2132
+ } | undefined;
2040
2133
  travis?: string | boolean | string[] | {
2041
2134
  config?: string | string[] | undefined;
2042
2135
  entry?: string | string[] | undefined;
@@ -2393,6 +2486,19 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
2393
2486
  entry?: string | string[] | undefined;
2394
2487
  project?: string | string[] | undefined;
2395
2488
  }>]>>;
2489
+ 'github-action': z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
2490
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
2491
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
2492
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
2493
+ }, "strip", z.ZodTypeAny, {
2494
+ config?: string | string[] | undefined;
2495
+ entry?: string | string[] | undefined;
2496
+ project?: string | string[] | undefined;
2497
+ }, {
2498
+ config?: string | string[] | undefined;
2499
+ entry?: string | string[] | undefined;
2500
+ project?: string | string[] | undefined;
2501
+ }>]>>;
2396
2502
  'github-actions': z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
2397
2503
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
2398
2504
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -2991,6 +3097,32 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
2991
3097
  entry?: string | string[] | undefined;
2992
3098
  project?: string | string[] | undefined;
2993
3099
  }>]>>;
3100
+ sst: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
3101
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
3102
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
3103
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
3104
+ }, "strip", z.ZodTypeAny, {
3105
+ config?: string | string[] | undefined;
3106
+ entry?: string | string[] | undefined;
3107
+ project?: string | string[] | undefined;
3108
+ }, {
3109
+ config?: string | string[] | undefined;
3110
+ entry?: string | string[] | undefined;
3111
+ project?: string | string[] | undefined;
3112
+ }>]>>;
3113
+ starlight: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
3114
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
3115
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
3116
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
3117
+ }, "strip", z.ZodTypeAny, {
3118
+ config?: string | string[] | undefined;
3119
+ entry?: string | string[] | undefined;
3120
+ project?: string | string[] | undefined;
3121
+ }, {
3122
+ config?: string | string[] | undefined;
3123
+ entry?: string | string[] | undefined;
3124
+ project?: string | string[] | undefined;
3125
+ }>]>>;
2994
3126
  storybook: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
2995
3127
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
2996
3128
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -3069,6 +3201,19 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
3069
3201
  entry?: string | string[] | undefined;
3070
3202
  project?: string | string[] | undefined;
3071
3203
  }>]>>;
3204
+ 'tanstack-router': z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
3205
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
3206
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
3207
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
3208
+ }, "strip", z.ZodTypeAny, {
3209
+ config?: string | string[] | undefined;
3210
+ entry?: string | string[] | undefined;
3211
+ project?: string | string[] | undefined;
3212
+ }, {
3213
+ config?: string | string[] | undefined;
3214
+ entry?: string | string[] | undefined;
3215
+ project?: string | string[] | undefined;
3216
+ }>]>>;
3072
3217
  travis: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
3073
3218
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
3074
3219
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -3329,7 +3474,7 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
3329
3474
  entry?: string | string[] | undefined;
3330
3475
  project?: string | string[] | undefined;
3331
3476
  }>]>>;
3332
- }>, "strip", z.ZodTypeAny, {
3477
+ }>, "strict", z.ZodTypeAny, {
3333
3478
  exclude?: ("dependencies" | "exports" | "files" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers")[] | undefined;
3334
3479
  tags?: string[] | undefined;
3335
3480
  include?: ("dependencies" | "exports" | "files" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers")[] | undefined;
@@ -3435,6 +3580,11 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
3435
3580
  entry?: string | string[] | undefined;
3436
3581
  project?: string | string[] | undefined;
3437
3582
  } | undefined;
3583
+ 'github-action'?: string | boolean | string[] | {
3584
+ config?: string | string[] | undefined;
3585
+ entry?: string | string[] | undefined;
3586
+ project?: string | string[] | undefined;
3587
+ } | undefined;
3438
3588
  'github-actions'?: string | boolean | string[] | {
3439
3589
  config?: string | string[] | undefined;
3440
3590
  entry?: string | string[] | undefined;
@@ -3660,6 +3810,16 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
3660
3810
  entry?: string | string[] | undefined;
3661
3811
  project?: string | string[] | undefined;
3662
3812
  } | undefined;
3813
+ sst?: string | boolean | string[] | {
3814
+ config?: string | string[] | undefined;
3815
+ entry?: string | string[] | undefined;
3816
+ project?: string | string[] | undefined;
3817
+ } | undefined;
3818
+ starlight?: string | boolean | string[] | {
3819
+ config?: string | string[] | undefined;
3820
+ entry?: string | string[] | undefined;
3821
+ project?: string | string[] | undefined;
3822
+ } | undefined;
3663
3823
  storybook?: string | boolean | string[] | {
3664
3824
  config?: string | string[] | undefined;
3665
3825
  entry?: string | string[] | undefined;
@@ -3690,6 +3850,11 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
3690
3850
  entry?: string | string[] | undefined;
3691
3851
  project?: string | string[] | undefined;
3692
3852
  } | undefined;
3853
+ 'tanstack-router'?: string | boolean | string[] | {
3854
+ config?: string | string[] | undefined;
3855
+ entry?: string | string[] | undefined;
3856
+ project?: string | string[] | undefined;
3857
+ } | undefined;
3693
3858
  travis?: string | boolean | string[] | {
3694
3859
  config?: string | string[] | undefined;
3695
3860
  entry?: string | string[] | undefined;
@@ -3790,6 +3955,7 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
3790
3955
  entry?: string | string[] | undefined;
3791
3956
  project?: string | string[] | undefined;
3792
3957
  } | undefined;
3958
+ $schema?: string | undefined;
3793
3959
  rules?: Partial<Record<"dependencies" | "exports" | "files" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers", "error" | "warn" | "off">> | undefined;
3794
3960
  paths?: Record<string, string[]> | undefined;
3795
3961
  ignore?: string | string[] | undefined;
@@ -3906,6 +4072,11 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
3906
4072
  entry?: string | string[] | undefined;
3907
4073
  project?: string | string[] | undefined;
3908
4074
  } | undefined;
4075
+ 'github-action'?: string | boolean | string[] | {
4076
+ config?: string | string[] | undefined;
4077
+ entry?: string | string[] | undefined;
4078
+ project?: string | string[] | undefined;
4079
+ } | undefined;
3909
4080
  'github-actions'?: string | boolean | string[] | {
3910
4081
  config?: string | string[] | undefined;
3911
4082
  entry?: string | string[] | undefined;
@@ -4131,6 +4302,16 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
4131
4302
  entry?: string | string[] | undefined;
4132
4303
  project?: string | string[] | undefined;
4133
4304
  } | undefined;
4305
+ sst?: string | boolean | string[] | {
4306
+ config?: string | string[] | undefined;
4307
+ entry?: string | string[] | undefined;
4308
+ project?: string | string[] | undefined;
4309
+ } | undefined;
4310
+ starlight?: string | boolean | string[] | {
4311
+ config?: string | string[] | undefined;
4312
+ entry?: string | string[] | undefined;
4313
+ project?: string | string[] | undefined;
4314
+ } | undefined;
4134
4315
  storybook?: string | boolean | string[] | {
4135
4316
  config?: string | string[] | undefined;
4136
4317
  entry?: string | string[] | undefined;
@@ -4161,6 +4342,11 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
4161
4342
  entry?: string | string[] | undefined;
4162
4343
  project?: string | string[] | undefined;
4163
4344
  } | undefined;
4345
+ 'tanstack-router'?: string | boolean | string[] | {
4346
+ config?: string | string[] | undefined;
4347
+ entry?: string | string[] | undefined;
4348
+ project?: string | string[] | undefined;
4349
+ } | undefined;
4164
4350
  travis?: string | boolean | string[] | {
4165
4351
  config?: string | string[] | undefined;
4166
4352
  entry?: string | string[] | undefined;
@@ -4375,6 +4561,11 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
4375
4561
  entry?: string | string[] | undefined;
4376
4562
  project?: string | string[] | undefined;
4377
4563
  } | undefined;
4564
+ 'github-action'?: string | boolean | string[] | {
4565
+ config?: string | string[] | undefined;
4566
+ entry?: string | string[] | undefined;
4567
+ project?: string | string[] | undefined;
4568
+ } | undefined;
4378
4569
  'github-actions'?: string | boolean | string[] | {
4379
4570
  config?: string | string[] | undefined;
4380
4571
  entry?: string | string[] | undefined;
@@ -4600,6 +4791,16 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
4600
4791
  entry?: string | string[] | undefined;
4601
4792
  project?: string | string[] | undefined;
4602
4793
  } | undefined;
4794
+ sst?: string | boolean | string[] | {
4795
+ config?: string | string[] | undefined;
4796
+ entry?: string | string[] | undefined;
4797
+ project?: string | string[] | undefined;
4798
+ } | undefined;
4799
+ starlight?: string | boolean | string[] | {
4800
+ config?: string | string[] | undefined;
4801
+ entry?: string | string[] | undefined;
4802
+ project?: string | string[] | undefined;
4803
+ } | undefined;
4603
4804
  storybook?: string | boolean | string[] | {
4604
4805
  config?: string | string[] | undefined;
4605
4806
  entry?: string | string[] | undefined;
@@ -4630,6 +4831,11 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
4630
4831
  entry?: string | string[] | undefined;
4631
4832
  project?: string | string[] | undefined;
4632
4833
  } | undefined;
4834
+ 'tanstack-router'?: string | boolean | string[] | {
4835
+ config?: string | string[] | undefined;
4836
+ entry?: string | string[] | undefined;
4837
+ project?: string | string[] | undefined;
4838
+ } | undefined;
4633
4839
  travis?: string | boolean | string[] | {
4634
4840
  config?: string | string[] | undefined;
4635
4841
  entry?: string | string[] | undefined;
@@ -4730,6 +4936,7 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
4730
4936
  entry?: string | string[] | undefined;
4731
4937
  project?: string | string[] | undefined;
4732
4938
  } | undefined;
4939
+ $schema?: string | undefined;
4733
4940
  rules?: Partial<Record<"dependencies" | "exports" | "files" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers", "error" | "warn" | "off">> | undefined;
4734
4941
  paths?: Record<string, string[]> | undefined;
4735
4942
  ignore?: string | string[] | undefined;
@@ -4846,6 +5053,11 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
4846
5053
  entry?: string | string[] | undefined;
4847
5054
  project?: string | string[] | undefined;
4848
5055
  } | undefined;
5056
+ 'github-action'?: string | boolean | string[] | {
5057
+ config?: string | string[] | undefined;
5058
+ entry?: string | string[] | undefined;
5059
+ project?: string | string[] | undefined;
5060
+ } | undefined;
4849
5061
  'github-actions'?: string | boolean | string[] | {
4850
5062
  config?: string | string[] | undefined;
4851
5063
  entry?: string | string[] | undefined;
@@ -5071,6 +5283,16 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
5071
5283
  entry?: string | string[] | undefined;
5072
5284
  project?: string | string[] | undefined;
5073
5285
  } | undefined;
5286
+ sst?: string | boolean | string[] | {
5287
+ config?: string | string[] | undefined;
5288
+ entry?: string | string[] | undefined;
5289
+ project?: string | string[] | undefined;
5290
+ } | undefined;
5291
+ starlight?: string | boolean | string[] | {
5292
+ config?: string | string[] | undefined;
5293
+ entry?: string | string[] | undefined;
5294
+ project?: string | string[] | undefined;
5295
+ } | undefined;
5074
5296
  storybook?: string | boolean | string[] | {
5075
5297
  config?: string | string[] | undefined;
5076
5298
  entry?: string | string[] | undefined;
@@ -5101,6 +5323,11 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
5101
5323
  entry?: string | string[] | undefined;
5102
5324
  project?: string | string[] | undefined;
5103
5325
  } | undefined;
5326
+ 'tanstack-router'?: string | boolean | string[] | {
5327
+ config?: string | string[] | undefined;
5328
+ entry?: string | string[] | undefined;
5329
+ project?: string | string[] | undefined;
5330
+ } | undefined;
5104
5331
  travis?: string | boolean | string[] | {
5105
5332
  config?: string | string[] | undefined;
5106
5333
  entry?: string | string[] | undefined;
@@ -35,6 +35,7 @@ const ignoreExportsUsedInFileSchema = z.union([
35
35
  ]), z.boolean()),
36
36
  ]);
37
37
  const rootConfigurationSchema = z.object({
38
+ $schema: z.string().optional(),
38
39
  rules: rulesSchema.optional(),
39
40
  entry: globSchema.optional(),
40
41
  project: globSchema.optional(),
@@ -74,4 +75,5 @@ const workspacesConfigurationSchema = z.object({
74
75
  export const knipConfigurationSchema = rootConfigurationSchema
75
76
  .merge(reportConfigSchema)
76
77
  .merge(workspacesConfigurationSchema)
77
- .merge(pluginsSchema.partial());
78
+ .merge(pluginsSchema.partial())
79
+ .strict();