From ebd50079a779e6d4e9d94645dfc82e53129feb1d Mon Sep 17 00:00:00 2001 From: Aaron Klinker Date: Sun, 14 Jan 2024 16:18:47 -0600 Subject: [PATCH] Cleanup unsed imports --- src/core/utils/building/build-entrypoints.ts | 2 +- src/core/utils/testing/fake-objects.ts | 1 + src/i18n/__tests__/client.test.ts | 2 +- src/i18n/index.ts | 8 ++++++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/core/utils/building/build-entrypoints.ts b/src/core/utils/building/build-entrypoints.ts index 9e8ac0d8..77a5f68c 100644 --- a/src/core/utils/building/build-entrypoints.ts +++ b/src/core/utils/building/build-entrypoints.ts @@ -6,7 +6,7 @@ import { } from '~/types'; import { getPublicFiles } from '~/core/utils/fs'; import fs from 'fs-extra'; -import { dirname, resolve, basename, extname } from 'node:path'; +import { dirname, resolve, extname } from 'node:path'; import type { Ora } from 'ora'; import pc from 'picocolors'; import { unnormalizePath } from '~/core/utils/paths'; diff --git a/src/core/utils/testing/fake-objects.ts b/src/core/utils/testing/fake-objects.ts index d713f303..ba90874a 100644 --- a/src/core/utils/testing/fake-objects.ts +++ b/src/core/utils/testing/fake-objects.ts @@ -211,6 +211,7 @@ export const fakeInternalConfig = fakeObjectCreator(() => { outBaseDir: fakeDir(), outDir: fakeDir(), publicDir: fakeDir(), + localesDir: fakeDir(), root: fakeDir(), runnerConfig: { config: {}, diff --git a/src/i18n/__tests__/client.test.ts b/src/i18n/__tests__/client.test.ts index 4eff609c..096be871 100644 --- a/src/i18n/__tests__/client.test.ts +++ b/src/i18n/__tests__/client.test.ts @@ -1,4 +1,4 @@ -import { describe, it, vi, expect, expectTypeOf } from 'vitest'; +import { describe, it, vi, expect } from 'vitest'; import { createExtensionI18n } from '../client'; import { fakeBrowser } from '@webext-core/fake-browser'; diff --git a/src/i18n/index.ts b/src/i18n/index.ts index 4ff89409..6203a591 100644 --- a/src/i18n/index.ts +++ b/src/i18n/index.ts @@ -1,3 +1,11 @@ +/** + * Simple, type-safe alternative to `browser.i18n.getMessage` with support for placeholders and plurals. + * + * See [the guide](https://wxt.dev/guide/localization.html) for more information. + * + * @module wxt/i18n + */ + import { DefaultMessageSchema, createExtensionI18n } from './client'; export interface WxtMessageSchema extends DefaultMessageSchema {