knip 3.8.4 → 3.10.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.
@@ -166,6 +166,19 @@ export declare const ConfigurationValidator: z.ZodObject<{
166
166
  entry?: string | string[] | undefined;
167
167
  project?: string | string[] | undefined;
168
168
  }>]>>;
169
+ eleventy: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
170
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
171
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
172
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
173
+ }, "strip", z.ZodTypeAny, {
174
+ config?: string | string[] | undefined;
175
+ entry?: string | string[] | undefined;
176
+ project?: string | string[] | undefined;
177
+ }, {
178
+ config?: string | string[] | undefined;
179
+ entry?: string | string[] | undefined;
180
+ project?: string | string[] | undefined;
181
+ }>]>>;
169
182
  eslint: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
170
183
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
171
184
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -270,6 +283,19 @@ export declare const ConfigurationValidator: z.ZodObject<{
270
283
  entry?: string | string[] | undefined;
271
284
  project?: string | string[] | undefined;
272
285
  }>]>>;
286
+ linthtml: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
287
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
288
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
289
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
290
+ }, "strip", z.ZodTypeAny, {
291
+ config?: string | string[] | undefined;
292
+ entry?: string | string[] | undefined;
293
+ project?: string | string[] | undefined;
294
+ }, {
295
+ config?: string | string[] | undefined;
296
+ entry?: string | string[] | undefined;
297
+ project?: string | string[] | undefined;
298
+ }>]>>;
273
299
  markdownlint: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
274
300
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
275
301
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -621,6 +647,19 @@ export declare const ConfigurationValidator: z.ZodObject<{
621
647
  entry?: string | string[] | undefined;
622
648
  project?: string | string[] | undefined;
623
649
  }>]>>;
650
+ wireit: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
651
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
652
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
653
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
654
+ }, "strip", z.ZodTypeAny, {
655
+ config?: string | string[] | undefined;
656
+ entry?: string | string[] | undefined;
657
+ project?: string | string[] | undefined;
658
+ }, {
659
+ config?: string | string[] | undefined;
660
+ entry?: string | string[] | undefined;
661
+ project?: string | string[] | undefined;
662
+ }>]>>;
624
663
  }, "strip", z.ZodTypeAny, {
625
664
  entry?: string | string[] | undefined;
626
665
  project?: string | string[] | undefined;
@@ -679,6 +718,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
679
718
  entry?: string | string[] | undefined;
680
719
  project?: string | string[] | undefined;
681
720
  } | undefined;
721
+ eleventy?: string | boolean | string[] | {
722
+ config?: string | string[] | undefined;
723
+ entry?: string | string[] | undefined;
724
+ project?: string | string[] | undefined;
725
+ } | undefined;
682
726
  eslint?: string | boolean | string[] | {
683
727
  config?: string | string[] | undefined;
684
728
  entry?: string | string[] | undefined;
@@ -719,6 +763,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
719
763
  entry?: string | string[] | undefined;
720
764
  project?: string | string[] | undefined;
721
765
  } | undefined;
766
+ linthtml?: string | boolean | string[] | {
767
+ config?: string | string[] | undefined;
768
+ entry?: string | string[] | undefined;
769
+ project?: string | string[] | undefined;
770
+ } | undefined;
722
771
  markdownlint?: string | boolean | string[] | {
723
772
  config?: string | string[] | undefined;
724
773
  entry?: string | string[] | undefined;
@@ -854,6 +903,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
854
903
  entry?: string | string[] | undefined;
855
904
  project?: string | string[] | undefined;
856
905
  } | undefined;
906
+ wireit?: string | boolean | string[] | {
907
+ config?: string | string[] | undefined;
908
+ entry?: string | string[] | undefined;
909
+ project?: string | string[] | undefined;
910
+ } | undefined;
857
911
  }, {
858
912
  entry?: string | string[] | undefined;
859
913
  project?: string | string[] | undefined;
@@ -912,6 +966,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
912
966
  entry?: string | string[] | undefined;
913
967
  project?: string | string[] | undefined;
914
968
  } | undefined;
969
+ eleventy?: string | boolean | string[] | {
970
+ config?: string | string[] | undefined;
971
+ entry?: string | string[] | undefined;
972
+ project?: string | string[] | undefined;
973
+ } | undefined;
915
974
  eslint?: string | boolean | string[] | {
916
975
  config?: string | string[] | undefined;
917
976
  entry?: string | string[] | undefined;
@@ -952,6 +1011,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
952
1011
  entry?: string | string[] | undefined;
953
1012
  project?: string | string[] | undefined;
954
1013
  } | undefined;
1014
+ linthtml?: string | boolean | string[] | {
1015
+ config?: string | string[] | undefined;
1016
+ entry?: string | string[] | undefined;
1017
+ project?: string | string[] | undefined;
1018
+ } | undefined;
955
1019
  markdownlint?: string | boolean | string[] | {
956
1020
  config?: string | string[] | undefined;
957
1021
  entry?: string | string[] | undefined;
@@ -1087,6 +1151,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
1087
1151
  entry?: string | string[] | undefined;
1088
1152
  project?: string | string[] | undefined;
1089
1153
  } | undefined;
1154
+ wireit?: string | boolean | string[] | {
1155
+ config?: string | string[] | undefined;
1156
+ entry?: string | string[] | undefined;
1157
+ project?: string | string[] | undefined;
1158
+ } | undefined;
1090
1159
  }>>>;
1091
1160
  astro: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
1092
1161
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -1218,6 +1287,19 @@ export declare const ConfigurationValidator: z.ZodObject<{
1218
1287
  entry?: string | string[] | undefined;
1219
1288
  project?: string | string[] | undefined;
1220
1289
  }>]>>;
1290
+ eleventy: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
1291
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1292
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1293
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1294
+ }, "strip", z.ZodTypeAny, {
1295
+ config?: string | string[] | undefined;
1296
+ entry?: string | string[] | undefined;
1297
+ project?: string | string[] | undefined;
1298
+ }, {
1299
+ config?: string | string[] | undefined;
1300
+ entry?: string | string[] | undefined;
1301
+ project?: string | string[] | undefined;
1302
+ }>]>>;
1221
1303
  eslint: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
1222
1304
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1223
1305
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -1322,6 +1404,19 @@ export declare const ConfigurationValidator: z.ZodObject<{
1322
1404
  entry?: string | string[] | undefined;
1323
1405
  project?: string | string[] | undefined;
1324
1406
  }>]>>;
1407
+ linthtml: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
1408
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1409
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1410
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1411
+ }, "strip", z.ZodTypeAny, {
1412
+ config?: string | string[] | undefined;
1413
+ entry?: string | string[] | undefined;
1414
+ project?: string | string[] | undefined;
1415
+ }, {
1416
+ config?: string | string[] | undefined;
1417
+ entry?: string | string[] | undefined;
1418
+ project?: string | string[] | undefined;
1419
+ }>]>>;
1325
1420
  markdownlint: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
1326
1421
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1327
1422
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -1673,6 +1768,19 @@ export declare const ConfigurationValidator: z.ZodObject<{
1673
1768
  entry?: string | string[] | undefined;
1674
1769
  project?: string | string[] | undefined;
1675
1770
  }>]>>;
1771
+ wireit: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
1772
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1773
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1774
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1775
+ }, "strip", z.ZodTypeAny, {
1776
+ config?: string | string[] | undefined;
1777
+ entry?: string | string[] | undefined;
1778
+ project?: string | string[] | undefined;
1779
+ }, {
1780
+ config?: string | string[] | undefined;
1781
+ entry?: string | string[] | undefined;
1782
+ project?: string | string[] | undefined;
1783
+ }>]>>;
1676
1784
  }, "strip", z.ZodTypeAny, {
1677
1785
  exclude?: string[] | undefined;
1678
1786
  rules?: Partial<Record<"files" | "dependencies" | "devDependencies" | "unlisted" | "binaries" | "unresolved" | "exports" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers", "error" | "warn" | "off">> | undefined;
@@ -1747,6 +1855,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
1747
1855
  entry?: string | string[] | undefined;
1748
1856
  project?: string | string[] | undefined;
1749
1857
  } | undefined;
1858
+ eleventy?: string | boolean | string[] | {
1859
+ config?: string | string[] | undefined;
1860
+ entry?: string | string[] | undefined;
1861
+ project?: string | string[] | undefined;
1862
+ } | undefined;
1750
1863
  eslint?: string | boolean | string[] | {
1751
1864
  config?: string | string[] | undefined;
1752
1865
  entry?: string | string[] | undefined;
@@ -1787,6 +1900,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
1787
1900
  entry?: string | string[] | undefined;
1788
1901
  project?: string | string[] | undefined;
1789
1902
  } | undefined;
1903
+ linthtml?: string | boolean | string[] | {
1904
+ config?: string | string[] | undefined;
1905
+ entry?: string | string[] | undefined;
1906
+ project?: string | string[] | undefined;
1907
+ } | undefined;
1790
1908
  markdownlint?: string | boolean | string[] | {
1791
1909
  config?: string | string[] | undefined;
1792
1910
  entry?: string | string[] | undefined;
@@ -1922,6 +2040,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
1922
2040
  entry?: string | string[] | undefined;
1923
2041
  project?: string | string[] | undefined;
1924
2042
  } | undefined;
2043
+ wireit?: string | boolean | string[] | {
2044
+ config?: string | string[] | undefined;
2045
+ entry?: string | string[] | undefined;
2046
+ project?: string | string[] | undefined;
2047
+ } | undefined;
1925
2048
  }> | undefined;
1926
2049
  astro?: string | boolean | string[] | {
1927
2050
  config?: string | string[] | undefined;
@@ -1973,6 +2096,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
1973
2096
  entry?: string | string[] | undefined;
1974
2097
  project?: string | string[] | undefined;
1975
2098
  } | undefined;
2099
+ eleventy?: string | boolean | string[] | {
2100
+ config?: string | string[] | undefined;
2101
+ entry?: string | string[] | undefined;
2102
+ project?: string | string[] | undefined;
2103
+ } | undefined;
1976
2104
  eslint?: string | boolean | string[] | {
1977
2105
  config?: string | string[] | undefined;
1978
2106
  entry?: string | string[] | undefined;
@@ -2013,6 +2141,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
2013
2141
  entry?: string | string[] | undefined;
2014
2142
  project?: string | string[] | undefined;
2015
2143
  } | undefined;
2144
+ linthtml?: string | boolean | string[] | {
2145
+ config?: string | string[] | undefined;
2146
+ entry?: string | string[] | undefined;
2147
+ project?: string | string[] | undefined;
2148
+ } | undefined;
2016
2149
  markdownlint?: string | boolean | string[] | {
2017
2150
  config?: string | string[] | undefined;
2018
2151
  entry?: string | string[] | undefined;
@@ -2148,6 +2281,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
2148
2281
  entry?: string | string[] | undefined;
2149
2282
  project?: string | string[] | undefined;
2150
2283
  } | undefined;
2284
+ wireit?: string | boolean | string[] | {
2285
+ config?: string | string[] | undefined;
2286
+ entry?: string | string[] | undefined;
2287
+ project?: string | string[] | undefined;
2288
+ } | undefined;
2151
2289
  }, {
2152
2290
  exclude?: string[] | undefined;
2153
2291
  rules?: Partial<Record<"files" | "dependencies" | "devDependencies" | "unlisted" | "binaries" | "unresolved" | "exports" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers", "error" | "warn" | "off">> | undefined;
@@ -2222,6 +2360,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
2222
2360
  entry?: string | string[] | undefined;
2223
2361
  project?: string | string[] | undefined;
2224
2362
  } | undefined;
2363
+ eleventy?: string | boolean | string[] | {
2364
+ config?: string | string[] | undefined;
2365
+ entry?: string | string[] | undefined;
2366
+ project?: string | string[] | undefined;
2367
+ } | undefined;
2225
2368
  eslint?: string | boolean | string[] | {
2226
2369
  config?: string | string[] | undefined;
2227
2370
  entry?: string | string[] | undefined;
@@ -2262,6 +2405,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
2262
2405
  entry?: string | string[] | undefined;
2263
2406
  project?: string | string[] | undefined;
2264
2407
  } | undefined;
2408
+ linthtml?: string | boolean | string[] | {
2409
+ config?: string | string[] | undefined;
2410
+ entry?: string | string[] | undefined;
2411
+ project?: string | string[] | undefined;
2412
+ } | undefined;
2265
2413
  markdownlint?: string | boolean | string[] | {
2266
2414
  config?: string | string[] | undefined;
2267
2415
  entry?: string | string[] | undefined;
@@ -2397,6 +2545,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
2397
2545
  entry?: string | string[] | undefined;
2398
2546
  project?: string | string[] | undefined;
2399
2547
  } | undefined;
2548
+ wireit?: string | boolean | string[] | {
2549
+ config?: string | string[] | undefined;
2550
+ entry?: string | string[] | undefined;
2551
+ project?: string | string[] | undefined;
2552
+ } | undefined;
2400
2553
  }> | undefined;
2401
2554
  astro?: string | boolean | string[] | {
2402
2555
  config?: string | string[] | undefined;
@@ -2448,6 +2601,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
2448
2601
  entry?: string | string[] | undefined;
2449
2602
  project?: string | string[] | undefined;
2450
2603
  } | undefined;
2604
+ eleventy?: string | boolean | string[] | {
2605
+ config?: string | string[] | undefined;
2606
+ entry?: string | string[] | undefined;
2607
+ project?: string | string[] | undefined;
2608
+ } | undefined;
2451
2609
  eslint?: string | boolean | string[] | {
2452
2610
  config?: string | string[] | undefined;
2453
2611
  entry?: string | string[] | undefined;
@@ -2488,6 +2646,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
2488
2646
  entry?: string | string[] | undefined;
2489
2647
  project?: string | string[] | undefined;
2490
2648
  } | undefined;
2649
+ linthtml?: string | boolean | string[] | {
2650
+ config?: string | string[] | undefined;
2651
+ entry?: string | string[] | undefined;
2652
+ project?: string | string[] | undefined;
2653
+ } | undefined;
2491
2654
  markdownlint?: string | boolean | string[] | {
2492
2655
  config?: string | string[] | undefined;
2493
2656
  entry?: string | string[] | undefined;
@@ -2623,4 +2786,9 @@ export declare const ConfigurationValidator: z.ZodObject<{
2623
2786
  entry?: string | string[] | undefined;
2624
2787
  project?: string | string[] | undefined;
2625
2788
  } | undefined;
2789
+ wireit?: string | boolean | string[] | {
2790
+ config?: string | string[] | undefined;
2791
+ entry?: string | string[] | undefined;
2792
+ project?: string | string[] | undefined;
2793
+ } | undefined;
2626
2794
  }>;
@@ -72,6 +72,7 @@ const pluginsSchema = z.object({
72
72
  commitlint: pluginSchema,
73
73
  cspell: pluginSchema,
74
74
  cypress: pluginSchema,
75
+ eleventy: pluginSchema,
75
76
  eslint: pluginSchema,
76
77
  gatsby: pluginSchema,
77
78
  'github-actions': pluginSchema,
@@ -80,6 +81,7 @@ const pluginsSchema = z.object({
80
81
  jest: pluginSchema,
81
82
  lefthook: pluginSchema,
82
83
  'lint-staged': pluginSchema,
84
+ linthtml: pluginSchema,
83
85
  markdownlint: pluginSchema,
84
86
  mocha: pluginSchema,
85
87
  next: pluginSchema,
@@ -107,6 +109,7 @@ const pluginsSchema = z.object({
107
109
  vite: pluginSchema,
108
110
  vitest: pluginSchema,
109
111
  webpack: pluginSchema,
112
+ wireit: pluginSchema,
110
113
  });
111
114
  const baseWorkspaceConfigurationSchema = z.object({
112
115
  entry: globSchema.optional(),
@@ -52,7 +52,7 @@ export declare class WorkspaceWorker {
52
52
  installedBinaries: InstalledBinaries;
53
53
  referencedDependencies: ReferencedDependencies;
54
54
  hasTypesIncluded: Set<string>;
55
- enabledPlugins: ("astro" | "angular" | "ava" | "babel" | "capacitor" | "changesets" | "commitizen" | "commitlint" | "cspell" | "cypress" | "eslint" | "gatsby" | "husky" | "jest" | "lefthook" | "markdownlint" | "mocha" | "next" | "nx" | "nyc" | "playwright" | "postcss" | "prettier" | "remark" | "remix" | "rollup" | "sentry" | "storybook" | "stryker" | "stylelint" | "svelte" | "tailwind" | "tsup" | "typedoc" | "typescript" | "vite" | "vitest" | "webpack" | "drizzle" | "githubActions" | "graphqlCodegen" | "lintStaged" | "nodeTestRunner" | "npmPackageJsonLint" | "playwrightCt" | "releaseIt" | "semanticRelease")[];
55
+ enabledPlugins: ("astro" | "angular" | "ava" | "babel" | "capacitor" | "changesets" | "commitizen" | "commitlint" | "cspell" | "cypress" | "eleventy" | "eslint" | "gatsby" | "husky" | "jest" | "lefthook" | "linthtml" | "markdownlint" | "mocha" | "next" | "nx" | "nyc" | "playwright" | "postcss" | "prettier" | "remark" | "remix" | "rollup" | "sentry" | "storybook" | "stryker" | "stylelint" | "svelte" | "tailwind" | "tsup" | "typedoc" | "typescript" | "vite" | "vitest" | "webpack" | "wireit" | "drizzle" | "githubActions" | "graphqlCodegen" | "lintStaged" | "nodeTestRunner" | "npmPackageJsonLint" | "playwrightCt" | "releaseIt" | "semanticRelease")[];
56
56
  entryFilePatterns: string[];
57
57
  productionEntryFilePatterns: string[];
58
58
  }>;
@@ -10,6 +10,7 @@ const argFilters = {
10
10
  'babel-node': withPositional,
11
11
  esbuild: withPositional,
12
12
  execa: withPositional,
13
+ vitest: withoutRequire,
13
14
  'ts-node': withPositional,
14
15
  zx: withPositional,
15
16
  default: withoutPositional,
package/dist/constants.js CHANGED
@@ -18,6 +18,7 @@ export const IGNORED_GLOBAL_BINARIES = [
18
18
  'echo',
19
19
  'exec',
20
20
  'exit',
21
+ 'find',
21
22
  'git',
22
23
  'grep',
23
24
  'mkdir',
@@ -0,0 +1,7 @@
1
+ import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js';
2
+ export declare const NAME = "Eleventy";
3
+ export declare const ENABLERS: string[];
4
+ export declare const isEnabled: IsPluginEnabledCallback;
5
+ export declare const ENTRY_FILE_PATTERNS: string[];
6
+ export declare const PRODUCTION_ENTRY_FILE_PATTERNS: string[];
7
+ export declare const findDependencies: GenericPluginCallback;
@@ -0,0 +1,15 @@
1
+ import { timerify } from '../../util/Performance.js';
2
+ import { hasDependency } from '../../util/plugin.js';
3
+ import { toEntryPattern, toProductionEntryPattern } from '../../util/protocols.js';
4
+ export const NAME = 'Eleventy';
5
+ export const ENABLERS = ['@11ty/eleventy'];
6
+ export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABLERS);
7
+ export const ENTRY_FILE_PATTERNS = ['.eleventy.js', 'eleventy.config.{js,cjs}'];
8
+ export const PRODUCTION_ENTRY_FILE_PATTERNS = ['_includes', '_data'];
9
+ const findEleventyDependencies = async (configFilePath, options) => {
10
+ const { config } = options;
11
+ return config.entry
12
+ ? config.entry.map(toProductionEntryPattern)
13
+ : [...ENTRY_FILE_PATTERNS.map(toEntryPattern), ...PRODUCTION_ENTRY_FILE_PATTERNS.map(toProductionEntryPattern)];
14
+ };
15
+ export const findDependencies = timerify(findEleventyDependencies);
@@ -9,6 +9,7 @@ export * as commitlint from './commitlint/index.js';
9
9
  export * as cspell from './cspell/index.js';
10
10
  export * as cypress from './cypress/index.js';
11
11
  export * as drizzle from './drizzle/index.js';
12
+ export * as eleventy from './eleventy/index.js';
12
13
  export * as eslint from './eslint/index.js';
13
14
  export * as gatsby from './gatsby/index.js';
14
15
  export * as githubActions from './github-actions/index.js';
@@ -17,6 +18,7 @@ export * as husky from './husky/index.js';
17
18
  export * as jest from './jest/index.js';
18
19
  export * as lefthook from './lefthook/index.js';
19
20
  export * as lintStaged from './lint-staged/index.js';
21
+ export * as linthtml from './linthtml/index.js';
20
22
  export * as markdownlint from './markdownlint/index.js';
21
23
  export * as mocha from './mocha/index.js';
22
24
  export * as next from './next/index.js';
@@ -45,3 +47,4 @@ export * as typescript from './typescript/index.js';
45
47
  export * as vite from './vite/index.js';
46
48
  export * as vitest from './vitest/index.js';
47
49
  export * as webpack from './webpack/index.js';
50
+ export * as wireit from './wireit/index.js';
@@ -9,6 +9,7 @@ export * as commitlint from './commitlint/index.js';
9
9
  export * as cspell from './cspell/index.js';
10
10
  export * as cypress from './cypress/index.js';
11
11
  export * as drizzle from './drizzle/index.js';
12
+ export * as eleventy from './eleventy/index.js';
12
13
  export * as eslint from './eslint/index.js';
13
14
  export * as gatsby from './gatsby/index.js';
14
15
  export * as githubActions from './github-actions/index.js';
@@ -17,6 +18,7 @@ export * as husky from './husky/index.js';
17
18
  export * as jest from './jest/index.js';
18
19
  export * as lefthook from './lefthook/index.js';
19
20
  export * as lintStaged from './lint-staged/index.js';
21
+ export * as linthtml from './linthtml/index.js';
20
22
  export * as markdownlint from './markdownlint/index.js';
21
23
  export * as mocha from './mocha/index.js';
22
24
  export * as next from './next/index.js';
@@ -45,3 +47,4 @@ export * as typescript from './typescript/index.js';
45
47
  export * as vite from './vite/index.js';
46
48
  export * as vitest from './vitest/index.js';
47
49
  export * as webpack from './webpack/index.js';
50
+ export * as wireit from './wireit/index.js';
@@ -0,0 +1,7 @@
1
+ import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js';
2
+ export declare const NAME = "LintHTML";
3
+ export declare const PACKAGE_JSON_PATH = "linthtmlConfig";
4
+ export declare const ENABLERS: string[];
5
+ export declare const isEnabled: IsPluginEnabledCallback;
6
+ export declare const CONFIG_FILE_PATTERNS: string[];
7
+ export declare const findDependencies: GenericPluginCallback;
@@ -0,0 +1,29 @@
1
+ import { basename, isInternal } from '../../util/path.js';
2
+ import { timerify } from '../../util/Performance.js';
3
+ import { hasDependency, load } from '../../util/plugin.js';
4
+ import { toEntryPattern } from '../../util/protocols.js';
5
+ export const NAME = 'LintHTML';
6
+ export const PACKAGE_JSON_PATH = 'linthtmlConfig';
7
+ export const ENABLERS = ['@linthtml/linthtml'];
8
+ export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABLERS);
9
+ export const CONFIG_FILE_PATTERNS = [
10
+ '.linthtmlrc',
11
+ '.linthtmlrc.json',
12
+ '.linthtmlrc.yml',
13
+ '.linthtmlrc.{js,cjs}',
14
+ 'package.json',
15
+ ];
16
+ const findPluginDependencies = async (configFilePath, options) => {
17
+ const { manifest } = options;
18
+ const localConfig = basename(configFilePath) === 'package.json' ? manifest.linthtmlConfig : await load(configFilePath);
19
+ if (!localConfig)
20
+ return [];
21
+ const extensions = [localConfig.extends ?? []]
22
+ .flat()
23
+ .map(extension => (isInternal(extension) ? toEntryPattern(extension) : extension));
24
+ const plugins = [localConfig.plugins ?? []]
25
+ .flat()
26
+ .map(plugin => (isInternal(plugin) ? toEntryPattern(plugin) : plugin));
27
+ return [...extensions, ...plugins];
28
+ };
29
+ export const findDependencies = timerify(findPluginDependencies);
@@ -0,0 +1,4 @@
1
+ export type PluginConfig = {
2
+ extends?: string | string[];
3
+ plugins?: string[];
4
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js';
2
+ export declare const NAME = "Wireit";
3
+ export declare const ENABLERS: string[];
4
+ export declare const isEnabled: IsPluginEnabledCallback;
5
+ export declare const CONFIG_FILE_PATTERNS: string[];
6
+ export declare const ENTRY_FILE_PATTERNS: never[];
7
+ export declare const PRODUCTION_ENTRY_FILE_PATTERNS: never[];
8
+ export declare const PROJECT_FILE_PATTERNS: never[];
9
+ export declare const PACKAGE_JSON_PATH = "wireit";
10
+ export declare const findDependencies: GenericPluginCallback;
@@ -0,0 +1,22 @@
1
+ import { timerify } from '../../util/Performance.js';
2
+ import { getDependenciesFromScripts, hasDependency } from '../../util/plugin.js';
3
+ export const NAME = 'Wireit';
4
+ export const ENABLERS = ['wireit'];
5
+ export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABLERS);
6
+ export const CONFIG_FILE_PATTERNS = ['package.json'];
7
+ export const ENTRY_FILE_PATTERNS = [];
8
+ export const PRODUCTION_ENTRY_FILE_PATTERNS = [];
9
+ export const PROJECT_FILE_PATTERNS = [];
10
+ export const PACKAGE_JSON_PATH = 'wireit';
11
+ const findWireItDependencies = async (_configFilePath, options) => {
12
+ const { cwd, manifest, isProduction } = options;
13
+ if (isProduction)
14
+ return [];
15
+ const localConfig = manifest[PACKAGE_JSON_PATH];
16
+ if (!localConfig)
17
+ return [];
18
+ const scripts = Object.values(localConfig).flatMap(({ command: script }) => (script ? [script] : []));
19
+ const scriptDependencies = getDependenciesFromScripts(scripts, { cwd, manifest });
20
+ return scriptDependencies;
21
+ };
22
+ export const findDependencies = timerify(findWireItDependencies);
@@ -0,0 +1,3 @@
1
+ export type WireitConfig = Record<string, {
2
+ command?: string;
3
+ }>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import ts from 'typescript';
2
+ declare const _default: (sourceFile: ts.SourceFile) => ((node: ts.Node, options: import("../../getImportsAndExports.js").GetImportsAndExportsOptions) => import("../../getImportsAndExports.js").AddImportOptions | import("../../getImportsAndExports.js").AddImportOptions[] | undefined) | undefined;
3
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import ts from 'typescript';
2
+ import { importVisitor as visit } from '../index.js';
3
+ export default visit(() => true, node => {
4
+ if (ts.isImportTypeNode(node) && node.isTypeOf) {
5
+ if (ts.isLiteralTypeNode(node.argument) && ts.isStringLiteral(node.argument.literal)) {
6
+ return { specifier: node.argument.literal.text, identifier: undefined, pos: 0 };
7
+ }
8
+ }
9
+ });
@@ -2,6 +2,7 @@ import ts from 'typescript';
2
2
  import importCall from './importCall.js';
3
3
  import importDeclaration from './importDeclaration.js';
4
4
  import importEqualsDeclaration from './importEqualsDeclaration.js';
5
+ import importType from './importType.js';
5
6
  import jsDocType from './jsDocType.js';
6
7
  import propertyAccessCall from './propertyAccessCall.js';
7
8
  import reExportDeclaration from './reExportDeclaration.js';
@@ -10,6 +11,7 @@ const visitors = [
10
11
  importCall,
11
12
  importDeclaration,
12
13
  importEqualsDeclaration,
14
+ importType,
13
15
  jsDocType,
14
16
  propertyAccessCall,
15
17
  reExportDeclaration,
@@ -74,6 +74,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
74
74
  entry?: string | string[] | undefined;
75
75
  project?: string | string[] | undefined;
76
76
  } | undefined;
77
+ eleventy?: string | boolean | string[] | {
78
+ config?: string | string[] | undefined;
79
+ entry?: string | string[] | undefined;
80
+ project?: string | string[] | undefined;
81
+ } | undefined;
77
82
  eslint?: string | boolean | string[] | {
78
83
  config?: string | string[] | undefined;
79
84
  entry?: string | string[] | undefined;
@@ -114,6 +119,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
114
119
  entry?: string | string[] | undefined;
115
120
  project?: string | string[] | undefined;
116
121
  } | undefined;
122
+ linthtml?: string | boolean | string[] | {
123
+ config?: string | string[] | undefined;
124
+ entry?: string | string[] | undefined;
125
+ project?: string | string[] | undefined;
126
+ } | undefined;
117
127
  markdownlint?: string | boolean | string[] | {
118
128
  config?: string | string[] | undefined;
119
129
  entry?: string | string[] | undefined;
@@ -249,6 +259,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
249
259
  entry?: string | string[] | undefined;
250
260
  project?: string | string[] | undefined;
251
261
  } | undefined;
262
+ wireit?: string | boolean | string[] | {
263
+ config?: string | string[] | undefined;
264
+ entry?: string | string[] | undefined;
265
+ project?: string | string[] | undefined;
266
+ } | undefined;
252
267
  }> | undefined;
253
268
  astro?: string | boolean | string[] | {
254
269
  config?: string | string[] | undefined;
@@ -300,6 +315,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
300
315
  entry?: string | string[] | undefined;
301
316
  project?: string | string[] | undefined;
302
317
  } | undefined;
318
+ eleventy?: string | boolean | string[] | {
319
+ config?: string | string[] | undefined;
320
+ entry?: string | string[] | undefined;
321
+ project?: string | string[] | undefined;
322
+ } | undefined;
303
323
  eslint?: string | boolean | string[] | {
304
324
  config?: string | string[] | undefined;
305
325
  entry?: string | string[] | undefined;
@@ -340,6 +360,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
340
360
  entry?: string | string[] | undefined;
341
361
  project?: string | string[] | undefined;
342
362
  } | undefined;
363
+ linthtml?: string | boolean | string[] | {
364
+ config?: string | string[] | undefined;
365
+ entry?: string | string[] | undefined;
366
+ project?: string | string[] | undefined;
367
+ } | undefined;
343
368
  markdownlint?: string | boolean | string[] | {
344
369
  config?: string | string[] | undefined;
345
370
  entry?: string | string[] | undefined;
@@ -475,4 +500,9 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
475
500
  entry?: string | string[] | undefined;
476
501
  project?: string | string[] | undefined;
477
502
  } | undefined;
503
+ wireit?: string | boolean | string[] | {
504
+ config?: string | string[] | undefined;
505
+ entry?: string | string[] | undefined;
506
+ project?: string | string[] | undefined;
507
+ } | undefined;
478
508
  };
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "3.8.4";
1
+ export declare const version = "3.10.0";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '3.8.4';
1
+ export const version = '3.10.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knip",
3
- "version": "3.8.4",
3
+ "version": "3.10.0",
4
4
  "description": "Find unused files, dependencies and exports in your TypeScript and JavaScript projects",
5
5
  "homepage": "https://knip.dev",
6
6
  "repository": {
@@ -58,7 +58,7 @@
58
58
  "@npmcli/package-json": "5.0.0",
59
59
  "@pkgjs/parseargs": "0.11.0",
60
60
  "@pnpm/logger": "5.0.0",
61
- "@pnpm/workspace.pkgs-graph": "^2.0.12",
61
+ "@pnpm/workspace.pkgs-graph": "^2.0.13",
62
62
  "@snyk/github-codeowners": "1.1.0",
63
63
  "chalk": "^5.3.0",
64
64
  "easy-table": "1.2.0",
@@ -83,7 +83,7 @@
83
83
  "@knip/eslint-config": "0.0.0",
84
84
  "@release-it/bumper": "^6.0.1",
85
85
  "@swc/cli": "^0.1.63",
86
- "@swc/core": "^1.3.101",
86
+ "@swc/core": "^1.3.102",
87
87
  "@types/js-yaml": "^4.0.9",
88
88
  "@types/micromatch": "^4.0.6",
89
89
  "@types/minimist": "^1.2.5",
@@ -97,7 +97,7 @@
97
97
  "prettier": "^3.1.1",
98
98
  "release-it": "^17.0.1",
99
99
  "tsx": "^4.7.0",
100
- "type-fest": "^4.8.3",
100
+ "type-fest": "^4.9.0",
101
101
  "typescript": "5.3.3"
102
102
  },
103
103
  "engines": {
package/schema.json CHANGED
@@ -274,6 +274,10 @@
274
274
  "title": "Drizzle plugin configuration (https://github.com/webpro/knip/blob/main/src/plugins/drizzle/README.md)",
275
275
  "$ref": "#/definitions/plugin"
276
276
  },
277
+ "eleventy": {
278
+ "title": "eleventy plugin configuration (https://github.com/webpro/knip/blob/main/src/plugins/eleventy/README.md)",
279
+ "$ref": "#/definitions/plugin"
280
+ },
277
281
  "eslint": {
278
282
  "title": "ESLint plugin configuration (https://github.com/webpro/knip/blob/main/src/plugins/eslint/README.md)",
279
283
  "$ref": "#/definitions/plugin"
@@ -306,6 +310,10 @@
306
310
  "title": "lint-staged plugin configuration (https://github.com/webpro/knip/blob/main/src/plugins/lint-staged/README.md)",
307
311
  "$ref": "#/definitions/plugin"
308
312
  },
313
+ "linthtml": {
314
+ "title": "linthtml plugin configuration (https://github.com/webpro/knip/blob/main/src/plugins/linthtml/README.md)",
315
+ "$ref": "#/definitions/plugin"
316
+ },
309
317
  "markdownlint": {
310
318
  "title": "markdownlint plugin configuration (https://github.com/webpro/knip/blob/main/src/plugins/markdownlint/README.md)",
311
319
  "$ref": "#/definitions/plugin"
@@ -417,6 +425,10 @@
417
425
  "webpack": {
418
426
  "title": "Webpack plugin configuration (https://github.com/webpro/knip/blob/main/src/plugins/webpack/README.md)",
419
427
  "$ref": "#/definitions/plugin"
428
+ },
429
+ "wireit": {
430
+ "title": "Wireit plugin configuration (https://github.com/webpro/knip/blob/main/src/plugins/wireit/README.md)",
431
+ "$ref": "#/definitions/plugin"
420
432
  }
421
433
  }
422
434
  },