knip 5.50.1 → 5.50.3

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.
@@ -98,6 +98,7 @@ export declare class ConfigurationChief {
98
98
  glob?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
99
99
  "graphql-codegen"?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
100
100
  husky?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
101
+ "i18next-parser"?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
101
102
  jest?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
102
103
  karma?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
103
104
  ladle?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
@@ -86,7 +86,7 @@ export class ConfigurationChief {
86
86
  this.manifest = manifest;
87
87
  const pnpmWorkspacesPath = findFile(this.cwd, 'pnpm-workspace.yaml');
88
88
  const pnpmWorkspaces = pnpmWorkspacesPath && (await _load(pnpmWorkspacesPath));
89
- if (this.manifest && !this.manifest.workspaces && pnpmWorkspaces) {
89
+ if (this.manifest && pnpmWorkspaces) {
90
90
  this.manifest.workspaces = pnpmWorkspaces;
91
91
  }
92
92
  for (const configPath of rawConfigArg ? [rawConfigArg] : KNIP_CONFIG_LOCATIONS) {
@@ -189,6 +189,7 @@ export class WorkspaceWorker {
189
189
  };
190
190
  const configFilesMap = this.configFilesMap;
191
191
  const configFiles = this.configFilesMap.get(wsName);
192
+ const seen = new Map();
192
193
  const handleConfigInput = (pluginName, input) => {
193
194
  const configFilePath = this.getReferencedInternalFilePath(input);
194
195
  if (configFilePath) {
@@ -268,10 +269,9 @@ export class WorkspaceWorker {
268
269
  configFileDir: dirname(configFilePath),
269
270
  configFileName: basename(configFilePath),
270
271
  };
271
- const seen = this.configFilesMap.get(wsName)?.get(pluginName)?.has(configFilePath);
272
272
  const cache = {};
273
273
  let loadedConfig;
274
- if (plugin.resolveEntryPaths && !seen) {
274
+ if (plugin.resolveEntryPaths && !seen.get(wsName)?.has(configFilePath)) {
275
275
  if (!loadedConfig)
276
276
  loadedConfig = await loadConfigForPlugin(configFilePath, plugin, resolveOpts, pluginName);
277
277
  if (loadedConfig) {
@@ -281,7 +281,7 @@ export class WorkspaceWorker {
281
281
  cache.resolveEntryPaths = inputs;
282
282
  }
283
283
  }
284
- if (plugin.resolveConfig && !seen) {
284
+ if (plugin.resolveConfig && !seen.get(wsName)?.has(configFilePath)) {
285
285
  if (!loadedConfig)
286
286
  loadedConfig = await loadConfigForPlugin(configFilePath, plugin, resolveOpts, pluginName);
287
287
  if (loadedConfig) {
@@ -308,6 +308,9 @@ export class WorkspaceWorker {
308
308
  if (basename(configFilePath) !== 'package.json') {
309
309
  addInput(toEntry(configFilePath));
310
310
  addInput(toConfig(pluginName, configFilePath));
311
+ if (!seen.has(wsName))
312
+ seen.set(wsName, new Set());
313
+ seen.get(wsName)?.add(configFilePath);
311
314
  }
312
315
  if (!isManifest && fd?.changed && fd.meta)
313
316
  fd.meta.data = cache;
@@ -139,6 +139,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
139
139
  entry?: string | string[] | undefined;
140
140
  project?: string | string[] | undefined;
141
141
  } | undefined;
142
+ 'i18next-parser'?: string | boolean | string[] | {
143
+ config?: string | string[] | undefined;
144
+ entry?: string | string[] | undefined;
145
+ project?: string | string[] | undefined;
146
+ } | undefined;
142
147
  jest?: string | boolean | string[] | {
143
148
  config?: string | string[] | undefined;
144
149
  entry?: string | string[] | undefined;
@@ -634,6 +639,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
634
639
  entry?: string | string[] | undefined;
635
640
  project?: string | string[] | undefined;
636
641
  } | undefined;
642
+ 'i18next-parser'?: string | boolean | string[] | {
643
+ config?: string | string[] | undefined;
644
+ entry?: string | string[] | undefined;
645
+ project?: string | string[] | undefined;
646
+ } | undefined;
637
647
  jest?: string | boolean | string[] | {
638
648
  config?: string | string[] | undefined;
639
649
  entry?: string | string[] | undefined;
@@ -0,0 +1,12 @@
1
+ import type { IsPluginEnabled } from '../../types/config.js';
2
+ declare const _default: {
3
+ title: string;
4
+ enablers: string[];
5
+ isEnabled: IsPluginEnabled;
6
+ config: string[];
7
+ args: {
8
+ binaries: string[];
9
+ config: boolean;
10
+ };
11
+ };
12
+ export default _default;
@@ -0,0 +1,16 @@
1
+ import { hasDependency } from '../../util/plugin.js';
2
+ const title = 'i18next Parser';
3
+ const enablers = ['i18next-parser'];
4
+ const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
5
+ const config = ['i18next-parser.config.{js,mjs,json,ts,yaml,yml}'];
6
+ const args = {
7
+ binaries: ['i18next'],
8
+ config: true,
9
+ };
10
+ export default {
11
+ title,
12
+ enablers,
13
+ isEnabled,
14
+ config,
15
+ args,
16
+ };
@@ -200,6 +200,16 @@ export declare const Plugins: {
200
200
  config: string[];
201
201
  resolveConfig: import("../types/config.js").ResolveConfig;
202
202
  };
203
+ 'i18next-parser': {
204
+ title: string;
205
+ enablers: string[];
206
+ isEnabled: import("../types/config.js").IsPluginEnabled;
207
+ config: string[];
208
+ args: {
209
+ binaries: string[];
210
+ config: boolean;
211
+ };
212
+ };
203
213
  jest: {
204
214
  title: string;
205
215
  enablers: string[];
@@ -23,6 +23,7 @@ import { default as githubActions } from './github-actions/index.js';
23
23
  import { default as glob } from './glob/index.js';
24
24
  import { default as graphqlCodegen } from './graphql-codegen/index.js';
25
25
  import { default as husky } from './husky/index.js';
26
+ import { default as i18nextParser } from './i18next-parser/index.js';
26
27
  import { default as jest } from './jest/index.js';
27
28
  import { default as karma } from './karma/index.js';
28
29
  import { default as ladle } from './ladle/index.js';
@@ -120,6 +121,7 @@ export const Plugins = {
120
121
  glob,
121
122
  'graphql-codegen': graphqlCodegen,
122
123
  husky,
124
+ 'i18next-parser': i18nextParser,
123
125
  jest,
124
126
  karma,
125
127
  ladle,
@@ -357,6 +357,19 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
357
357
  entry?: string | string[] | undefined;
358
358
  project?: string | string[] | undefined;
359
359
  }>]>>;
360
+ 'i18next-parser': z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
361
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
362
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
363
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
364
+ }, "strip", z.ZodTypeAny, {
365
+ config?: string | string[] | undefined;
366
+ entry?: string | string[] | undefined;
367
+ project?: string | string[] | undefined;
368
+ }, {
369
+ config?: string | string[] | undefined;
370
+ entry?: string | string[] | undefined;
371
+ project?: string | string[] | undefined;
372
+ }>]>>;
360
373
  jest: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
361
374
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
362
375
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -1413,6 +1426,11 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
1413
1426
  entry?: string | string[] | undefined;
1414
1427
  project?: string | string[] | undefined;
1415
1428
  } | undefined;
1429
+ 'i18next-parser'?: string | boolean | string[] | {
1430
+ config?: string | string[] | undefined;
1431
+ entry?: string | string[] | undefined;
1432
+ project?: string | string[] | undefined;
1433
+ } | undefined;
1416
1434
  jest?: string | boolean | string[] | {
1417
1435
  config?: string | string[] | undefined;
1418
1436
  entry?: string | string[] | undefined;
@@ -1903,6 +1921,11 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
1903
1921
  entry?: string | string[] | undefined;
1904
1922
  project?: string | string[] | undefined;
1905
1923
  } | undefined;
1924
+ 'i18next-parser'?: string | boolean | string[] | {
1925
+ config?: string | string[] | undefined;
1926
+ entry?: string | string[] | undefined;
1927
+ project?: string | string[] | undefined;
1928
+ } | undefined;
1906
1929
  jest?: string | boolean | string[] | {
1907
1930
  config?: string | string[] | undefined;
1908
1931
  entry?: string | string[] | undefined;
@@ -2587,6 +2610,19 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
2587
2610
  entry?: string | string[] | undefined;
2588
2611
  project?: string | string[] | undefined;
2589
2612
  }>]>>;
2613
+ 'i18next-parser': z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
2614
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
2615
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
2616
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
2617
+ }, "strip", z.ZodTypeAny, {
2618
+ config?: string | string[] | undefined;
2619
+ entry?: string | string[] | undefined;
2620
+ project?: string | string[] | undefined;
2621
+ }, {
2622
+ config?: string | string[] | undefined;
2623
+ entry?: string | string[] | undefined;
2624
+ project?: string | string[] | undefined;
2625
+ }>]>>;
2590
2626
  jest: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
2591
2627
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
2592
2628
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -3646,6 +3682,11 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
3646
3682
  entry?: string | string[] | undefined;
3647
3683
  project?: string | string[] | undefined;
3648
3684
  } | undefined;
3685
+ 'i18next-parser'?: string | boolean | string[] | {
3686
+ config?: string | string[] | undefined;
3687
+ entry?: string | string[] | undefined;
3688
+ project?: string | string[] | undefined;
3689
+ } | undefined;
3649
3690
  jest?: string | boolean | string[] | {
3650
3691
  config?: string | string[] | undefined;
3651
3692
  entry?: string | string[] | undefined;
@@ -4143,6 +4184,11 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
4143
4184
  entry?: string | string[] | undefined;
4144
4185
  project?: string | string[] | undefined;
4145
4186
  } | undefined;
4187
+ 'i18next-parser'?: string | boolean | string[] | {
4188
+ config?: string | string[] | undefined;
4189
+ entry?: string | string[] | undefined;
4190
+ project?: string | string[] | undefined;
4191
+ } | undefined;
4146
4192
  jest?: string | boolean | string[] | {
4147
4193
  config?: string | string[] | undefined;
4148
4194
  entry?: string | string[] | undefined;
@@ -4637,6 +4683,11 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
4637
4683
  entry?: string | string[] | undefined;
4638
4684
  project?: string | string[] | undefined;
4639
4685
  } | undefined;
4686
+ 'i18next-parser'?: string | boolean | string[] | {
4687
+ config?: string | string[] | undefined;
4688
+ entry?: string | string[] | undefined;
4689
+ project?: string | string[] | undefined;
4690
+ } | undefined;
4640
4691
  jest?: string | boolean | string[] | {
4641
4692
  config?: string | string[] | undefined;
4642
4693
  entry?: string | string[] | undefined;
@@ -5134,6 +5185,11 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
5134
5185
  entry?: string | string[] | undefined;
5135
5186
  project?: string | string[] | undefined;
5136
5187
  } | undefined;
5188
+ 'i18next-parser'?: string | boolean | string[] | {
5189
+ config?: string | string[] | undefined;
5190
+ entry?: string | string[] | undefined;
5191
+ project?: string | string[] | undefined;
5192
+ } | undefined;
5137
5193
  jest?: string | boolean | string[] | {
5138
5194
  config?: string | string[] | undefined;
5139
5195
  entry?: string | string[] | undefined;
@@ -339,6 +339,19 @@ export declare const pluginsSchema: z.ZodObject<{
339
339
  entry?: string | string[] | undefined;
340
340
  project?: string | string[] | undefined;
341
341
  }>]>;
342
+ 'i18next-parser': z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
343
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
344
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
345
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
346
+ }, "strip", z.ZodTypeAny, {
347
+ config?: string | string[] | undefined;
348
+ entry?: string | string[] | undefined;
349
+ project?: string | string[] | undefined;
350
+ }, {
351
+ config?: string | string[] | undefined;
352
+ entry?: string | string[] | undefined;
353
+ project?: string | string[] | undefined;
354
+ }>]>;
342
355
  jest: z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
343
356
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
344
357
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -1393,6 +1406,11 @@ export declare const pluginsSchema: z.ZodObject<{
1393
1406
  entry?: string | string[] | undefined;
1394
1407
  project?: string | string[] | undefined;
1395
1408
  };
1409
+ 'i18next-parser': string | boolean | string[] | {
1410
+ config?: string | string[] | undefined;
1411
+ entry?: string | string[] | undefined;
1412
+ project?: string | string[] | undefined;
1413
+ };
1396
1414
  jest: string | boolean | string[] | {
1397
1415
  config?: string | string[] | undefined;
1398
1416
  entry?: string | string[] | undefined;
@@ -1874,6 +1892,11 @@ export declare const pluginsSchema: z.ZodObject<{
1874
1892
  entry?: string | string[] | undefined;
1875
1893
  project?: string | string[] | undefined;
1876
1894
  };
1895
+ 'i18next-parser': string | boolean | string[] | {
1896
+ config?: string | string[] | undefined;
1897
+ entry?: string | string[] | undefined;
1898
+ project?: string | string[] | undefined;
1899
+ };
1877
1900
  jest: string | boolean | string[] | {
1878
1901
  config?: string | string[] | undefined;
1879
1902
  entry?: string | string[] | undefined;
@@ -35,6 +35,7 @@ export const pluginsSchema = z.object({
35
35
  glob: pluginSchema,
36
36
  'graphql-codegen': pluginSchema,
37
37
  husky: pluginSchema,
38
+ 'i18next-parser': pluginSchema,
38
39
  jest: pluginSchema,
39
40
  karma: pluginSchema,
40
41
  ladle: pluginSchema,
@@ -1,2 +1,2 @@
1
- export type PluginName = 'angular' | 'astro' | 'ava' | 'babel' | 'c8' | 'capacitor' | 'changesets' | 'commitizen' | 'commitlint' | 'create-typescript-app' | 'cspell' | 'cucumber' | 'cypress' | 'dependency-cruiser' | 'dotenv' | 'drizzle' | 'eleventy' | 'eslint' | 'expo' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'husky' | 'jest' | 'karma' | 'ladle' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lockfile-lint' | 'lost-pixel' | 'markdownlint' | 'metro' | 'mocha' | 'moonrepo' | 'msw' | 'nest' | 'netlify' | 'next' | 'node' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nx' | 'nyc' | 'oclif' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'postcss' | 'preconstruct' | 'prettier' | 'react-cosmos' | 'react-router' | 'release-it' | 'remark' | 'remix' | 'rollup' | 'rsbuild' | 'rspack' | 'semantic-release' | 'sentry' | 'simple-git-hooks' | 'size-limit' | 'sst' | 'starlight' | 'storybook' | 'stryker' | 'stylelint' | 'svelte' | 'syncpack' | 'tailwind' | 'tanstack-router' | 'travis' | 'ts-node' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'vercel-og' | 'vike' | 'vite' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'xo' | 'yarn' | 'yorkie';
2
- export declare const pluginNames: readonly ["angular", "astro", "ava", "babel", "c8", "capacitor", "changesets", "commitizen", "commitlint", "create-typescript-app", "cspell", "cucumber", "cypress", "dependency-cruiser", "dotenv", "drizzle", "eleventy", "eslint", "expo", "gatsby", "github-action", "github-actions", "glob", "graphql-codegen", "husky", "jest", "karma", "ladle", "lefthook", "lint-staged", "linthtml", "lockfile-lint", "lost-pixel", "markdownlint", "metro", "mocha", "moonrepo", "msw", "nest", "netlify", "next", "node", "nodemon", "npm-package-json-lint", "nuxt", "nx", "nyc", "oclif", "playwright", "playwright-ct", "playwright-test", "plop", "postcss", "preconstruct", "prettier", "react-cosmos", "react-router", "release-it", "remark", "remix", "rollup", "rsbuild", "rspack", "semantic-release", "sentry", "simple-git-hooks", "size-limit", "sst", "starlight", "storybook", "stryker", "stylelint", "svelte", "syncpack", "tailwind", "tanstack-router", "travis", "ts-node", "tsup", "tsx", "typedoc", "typescript", "unbuild", "unocss", "vercel-og", "vike", "vite", "vitest", "vue", "webdriver-io", "webpack", "wireit", "wrangler", "xo", "yarn", "yorkie"];
1
+ export type PluginName = 'angular' | 'astro' | 'ava' | 'babel' | 'c8' | 'capacitor' | 'changesets' | 'commitizen' | 'commitlint' | 'create-typescript-app' | 'cspell' | 'cucumber' | 'cypress' | 'dependency-cruiser' | 'dotenv' | 'drizzle' | 'eleventy' | 'eslint' | 'expo' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'husky' | 'i18next-parser' | 'jest' | 'karma' | 'ladle' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lockfile-lint' | 'lost-pixel' | 'markdownlint' | 'metro' | 'mocha' | 'moonrepo' | 'msw' | 'nest' | 'netlify' | 'next' | 'node' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nx' | 'nyc' | 'oclif' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'postcss' | 'preconstruct' | 'prettier' | 'react-cosmos' | 'react-router' | 'release-it' | 'remark' | 'remix' | 'rollup' | 'rsbuild' | 'rspack' | 'semantic-release' | 'sentry' | 'simple-git-hooks' | 'size-limit' | 'sst' | 'starlight' | 'storybook' | 'stryker' | 'stylelint' | 'svelte' | 'syncpack' | 'tailwind' | 'tanstack-router' | 'travis' | 'ts-node' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'vercel-og' | 'vike' | 'vite' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'xo' | 'yarn' | 'yorkie';
2
+ export declare const pluginNames: readonly ["angular", "astro", "ava", "babel", "c8", "capacitor", "changesets", "commitizen", "commitlint", "create-typescript-app", "cspell", "cucumber", "cypress", "dependency-cruiser", "dotenv", "drizzle", "eleventy", "eslint", "expo", "gatsby", "github-action", "github-actions", "glob", "graphql-codegen", "husky", "i18next-parser", "jest", "karma", "ladle", "lefthook", "lint-staged", "linthtml", "lockfile-lint", "lost-pixel", "markdownlint", "metro", "mocha", "moonrepo", "msw", "nest", "netlify", "next", "node", "nodemon", "npm-package-json-lint", "nuxt", "nx", "nyc", "oclif", "playwright", "playwright-ct", "playwright-test", "plop", "postcss", "preconstruct", "prettier", "react-cosmos", "react-router", "release-it", "remark", "remix", "rollup", "rsbuild", "rspack", "semantic-release", "sentry", "simple-git-hooks", "size-limit", "sst", "starlight", "storybook", "stryker", "stylelint", "svelte", "syncpack", "tailwind", "tanstack-router", "travis", "ts-node", "tsup", "tsx", "typedoc", "typescript", "unbuild", "unocss", "vercel-og", "vike", "vite", "vitest", "vue", "webdriver-io", "webpack", "wireit", "wrangler", "xo", "yarn", "yorkie"];
@@ -24,6 +24,7 @@ export const pluginNames = [
24
24
  'glob',
25
25
  'graphql-codegen',
26
26
  'husky',
27
+ 'i18next-parser',
27
28
  'jest',
28
29
  'karma',
29
30
  'ladle',
@@ -41,6 +41,14 @@ export default visit(() => true, node => {
41
41
  });
42
42
  }
43
43
  }
44
+ if (imports.length === 0) {
45
+ imports.push({
46
+ specifier,
47
+ identifier: undefined,
48
+ isTypeOnly: node.importClause?.isTypeOnly,
49
+ pos: node.importClause.namedBindings.pos,
50
+ });
51
+ }
44
52
  }
45
53
  return imports;
46
54
  }
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "5.50.1";
1
+ export declare const version = "5.50.3";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '5.50.1';
1
+ export const version = '5.50.3';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knip",
3
- "version": "5.50.1",
3
+ "version": "5.50.3",
4
4
  "description": "Find and fix unused files, dependencies and exports in your TypeScript and JavaScript projects",
5
5
  "homepage": "https://knip.dev",
6
6
  "repository": {
package/schema.json CHANGED
@@ -391,6 +391,10 @@
391
391
  "title": "husky plugin configuration (https://knip.dev/reference/plugins/husky)",
392
392
  "$ref": "#/definitions/plugin"
393
393
  },
394
+ "i18next-parser": {
395
+ "title": "i18next-parser plugin configuration (https://knip.dev/reference/plugins/i18next-parser)",
396
+ "$ref": "#/definitions/plugin"
397
+ },
394
398
  "jest": {
395
399
  "title": "Jest plugin configuration (https://knip.dev/reference/plugins/jest)",
396
400
  "$ref": "#/definitions/plugin"