From 10c145bc26a390c30d04253881a91e07afebea13 Mon Sep 17 00:00:00 2001
From: Shin'ya Ueoka
Date: Sat, 20 Jul 2024 07:00:51 +0000
Subject: [PATCH] replace default export with named export
---
.eslintrc | 6 +
e2e/blacklist.test.ts | 2 +-
e2e/clipboard.test.ts | 2 +-
e2e/command.test.ts | 2 +-
e2e/completion_open.test.ts | 2 +-
e2e/follow_properties.test.ts | 2 +-
e2e/lib/SettingRepository.ts | 2 +-
src/background/Application.ts | 16 +--
src/background/command/AddBookmarkCommand.ts | 4 +-
src/background/command/BufferCommand.ts | 6 +-
src/background/command/BufferCommandHelper.ts | 2 +-
src/background/command/BufferDeleteCommand.ts | 6 +-
.../command/BufferDeletesCommand.ts | 6 +-
src/background/command/HelpCommand.ts | 4 +-
src/background/command/OpenCommand.ts | 6 +-
src/background/command/OpenCommandHelper.ts | 2 +-
src/background/command/QuitAllCommand.ts | 4 +-
src/background/command/QuitCommand.ts | 4 +-
src/background/command/SetCommand.ts | 4 +-
src/background/command/TabOpenCommand.ts | 6 +-
src/background/command/WindowOpenCommand.ts | 6 +-
src/background/command/index.ts | 24 ++--
.../controllers/CommandController.ts | 4 +-
.../controllers/ConsoleController.ts | 4 +-
src/background/controllers/FindController.ts | 4 +-
src/background/controllers/KeyController.ts | 18 +--
.../controllers/OperationController.ts | 4 +-
.../controllers/SettingsController.ts | 4 +-
.../controllers/VersionController.ts | 4 +-
src/background/hint/HintActionFactory.ts | 22 +--
src/background/hint/OpenCommandHintAction.ts | 2 +-
src/background/hint/OpenHintAction.ts | 2 +-
src/background/hint/OpenImageHintAction.ts | 2 +-
src/background/hint/OpenSourceHintAction.ts | 2 +-
src/background/hint/QuickHintAction.ts | 2 +-
.../hint/TabopenCommandHintAction.ts | 2 +-
src/background/hint/TabopenHintAction.ts | 2 +-
.../hint/WinopenCommandHintAction.ts | 2 +-
src/background/hint/WinopenHintAction.ts | 2 +-
src/background/hint/YankLinkTextHintAction.ts | 2 +-
src/background/hint/YankURLHintAction.ts | 2 +-
src/background/index.ts | 2 +-
.../messaging/BackgroundMessageListener.ts | 14 +-
src/background/messaging/FindPortListener.ts | 2 +-
.../operators/impls/CancelOperator.ts | 2 +-
.../operators/impls/CloseTabOperator.ts | 2 +-
.../operators/impls/CloseTabRightOperator.ts | 2 +-
.../operators/impls/DisableAddonOperator.ts | 4 +-
.../operators/impls/DuplicateTabOperator.ts | 2 +-
.../operators/impls/EnableAddonOperator.ts | 4 +-
.../operators/impls/FindNextOperator.ts | 4 +-
.../operators/impls/FindPrevOperator.ts | 4 +-
.../operators/impls/FocusOperator.ts | 2 +-
.../impls/HorizontalScrollOperator.ts | 2 +-
.../impls/NavigateHistoryNextOperator.ts | 2 +-
.../impls/NavigateHistoryPrevOperator.ts | 2 +-
.../impls/NavigateLinkNextOperator.ts | 2 +-
.../impls/NavigateLinkPrevOperator.ts | 2 +-
.../operators/impls/NavigateParentOperator.ts | 2 +-
.../operators/impls/NavigateRootOperator.ts | 2 +-
.../impls/OpenCommandHintOperator.ts | 6 +-
.../operators/impls/OpenHintOperator.ts | 6 +-
.../operators/impls/OpenHomeOperator.ts | 2 +-
.../operators/impls/OpenImageHintOperator.ts | 6 +-
.../operators/impls/OpenSourceHintOperator.ts | 6 +-
.../operators/impls/OpenSourceOperator.ts | 2 +-
.../operators/impls/PageScrollOperator.ts | 2 +-
.../operators/impls/PasteOperator.ts | 2 +-
.../operators/impls/PinTabOperator.ts | 2 +-
.../operators/impls/QuickHintOperator.ts | 6 +-
.../operators/impls/ReloadTabOperator.ts | 2 +-
.../operators/impls/ReopenTabOperator.ts | 2 +-
.../operators/impls/RepeatLastOperator.ts | 2 +-
.../operators/impls/ScrollToBottomOperator.ts | 2 +-
.../operators/impls/ScrollToEndOperator.ts | 2 +-
.../operators/impls/ScrollToHomeOperator.ts | 2 +-
.../operators/impls/ScrollToTopOperator.ts | 2 +-
.../operators/impls/SelectFirstTabOperator.ts | 2 +-
.../operators/impls/SelectLastTabOperator.ts | 2 +-
.../SelectPreviousSelectedTabOperator.ts | 2 +-
.../operators/impls/SelectTabNextOperator.ts | 2 +-
.../operators/impls/SelectTabPrevOperator.ts | 2 +-
.../impls/ShowAddBookmarkOperator.ts | 2 +-
.../impls/ShowBufferCommandOperator.ts | 2 +-
.../operators/impls/ShowCommandOperator.ts | 2 +-
.../impls/ShowOpenCommandOperator.ts | 2 +-
.../impls/ShowTabOpenCommandOperator.ts | 2 +-
.../impls/ShowWinOpenCommandOperator.ts | 2 +-
.../operators/impls/StartFindOperator.ts | 2 +-
.../operators/impls/StartFollowOperator.ts | 4 +-
.../operators/impls/StartJumpMarkOperator.ts | 4 +-
.../operators/impls/StartSetMarkOperator.ts | 4 +-
.../impls/TabopenCommandHintOperator.ts | 6 +-
.../operators/impls/TabopenHintOperator.ts | 6 +-
.../operators/impls/ToggleAddonOperator.ts | 4 +-
.../impls/TogglePinnedTabOperator.ts | 2 +-
.../operators/impls/ToggleReaderOperator.ts | 2 +-
.../operators/impls/UnpinTabOperator.ts | 2 +-
.../operators/impls/VerticalScrollOperator.ts | 2 +-
.../impls/WinopenCommandHintOperator.ts | 6 +-
.../operators/impls/WinopenHintOperator.ts | 6 +-
.../operators/impls/YankLinkTextOperator.ts | 6 +-
.../operators/impls/YankOperator.ts | 2 +-
.../operators/impls/YankURLHintOperator.ts | 6 +-
src/background/operators/impls/ZoomHelper.ts | 4 +-
.../operators/impls/ZoomInOperator.ts | 4 +-
.../operators/impls/ZoomOutOperator.ts | 4 +-
.../operators/impls/ZoomResetOperator.ts | 2 +-
src/background/operators/index.ts | 126 +++++++++---------
.../property/ColorSchemeProperty.ts | 2 +-
src/background/property/CompleteProperty.ts | 2 +-
src/background/property/FindModeProperty.ts | 2 +-
src/background/property/HintcharsProperty.ts | 2 +-
src/background/property/IgnoreCaseProperty.ts | 2 +-
.../property/SmoothScrollProperty.ts | 2 +-
src/background/property/index.ts | 12 +-
.../repositories/BookmarkRepository.ts | 12 --
src/background/settings/Validator.ts | 2 +-
.../usecases/AddonEnabledEventUseCase.ts | 6 +-
.../usecases/AddonEnabledUseCase.ts | 2 +-
src/background/usecases/CommandUseCase.ts | 2 +-
src/background/usecases/ConsoleUseCase.ts | 2 +-
src/background/usecases/EventUseCaseHelper.ts | 2 +-
src/background/usecases/FindUseCase.ts | 2 +-
src/background/usecases/HintKeyUseCase.ts | 2 +-
src/background/usecases/HintModeUseCase.ts | 4 +-
src/background/usecases/HintTagProducer.ts | 2 +-
src/background/usecases/MarkHelper.ts | 2 +-
src/background/usecases/MarkJumpUseCase.ts | 4 +-
src/background/usecases/MarkSetUseCase.ts | 4 +-
src/background/usecases/ModeUseCase.ts | 2 +-
src/background/usecases/OperationUseCase.ts | 2 +-
.../usecases/SettingsEventUseCase.ts | 4 +-
src/background/usecases/SettingsUseCase.ts | 4 +-
src/background/usecases/VersionUseCase.ts | 2 +-
src/console/App.tsx | 12 +-
src/console/app/hooks.ts | 4 +-
src/console/app/provider.tsx | 2 +-
src/console/app/recuer.ts | 6 +-
src/console/clients/CommandClient.ts | 2 +-
src/console/clients/ConsoleFrameClient.ts | 2 +-
src/console/clients/FindClient.ts | 2 +-
src/console/clients/SettingClient.ts | 2 +-
.../completion/components/Completion.tsx | 10 +-
.../completion/components/CompletionItem.tsx | 4 +-
.../completion/components/CompletionList.tsx | 8 +-
.../completion/components/CompletionTitle.tsx | 8 +-
.../completion/hooks/useCompletionKeyBinds.ts | 4 +-
src/console/completion/hooks/useCursor.ts | 5 +-
src/console/completion/index.tsx | 3 -
src/console/components/ErrorMessage.tsx | 6 +-
src/console/components/InfoMessage.tsx | 6 +-
src/console/components/Prompt.tsx | 12 +-
src/console/components/PromptInput.tsx | 33 +++--
src/console/hooks/useAutoResize.ts | 6 +-
src/console/hooks/useDebounce.ts | 4 +-
src/console/index.tsx | 2 +-
src/console/styles/colorScheme.tsx | 2 +-
src/console/styles/providers.tsx | 1 -
src/console/styles/userPreferenceCSS.tsx | 2 +-
src/content/Application.ts | 12 +-
src/content/Bootstrap.ts | 2 +-
src/content/InputDriver.ts | 2 +-
.../controllers/AddonEnabledController.ts | 4 +-
.../controllers/ConsoleFrameController.ts | 4 +-
src/content/controllers/FindController.ts | 4 +-
src/content/controllers/FocusController.ts | 2 +-
src/content/controllers/FrameController.ts | 4 +-
src/content/controllers/HintController.ts | 4 +-
src/content/controllers/KeyController.ts | 6 +-
src/content/controllers/ModeController.ts | 2 +-
src/content/controllers/NavigateController.ts | 4 +-
src/content/controllers/ScrollController.ts | 2 +-
src/content/controllers/SettingsController.ts | 4 +-
src/content/controllers/TopFrameController.ts | 4 +-
src/content/domains/KeySequence.ts | 2 +-
src/content/index.ts | 4 +-
.../messaging/ContentMessageListener.ts | 24 ++--
.../messaging/WindowMessageListener.ts | 6 +-
src/content/presenters/HTMLElementLocator.ts | 4 +-
src/content/presenters/Hint.ts | 2 +-
src/content/presenters/HintPresenter.ts | 4 +-
src/content/repositories/KeymapRepository.ts | 2 +-
src/content/usecases/AddonEnabledUseCase.ts | 2 +-
src/content/usecases/ConsoleFrameUseCase.ts | 2 +-
src/content/usecases/FindUseCase.ts | 2 +-
src/content/usecases/FrameUseCase.ts | 2 +-
src/content/usecases/HintUseCase.ts | 2 +-
src/content/usecases/KeymapUseCase.ts | 4 +-
src/content/usecases/NavigateUseCase.ts | 2 +-
src/content/usecases/OperationUseCase.ts | 2 +-
src/content/usecases/TopFrameUseCase.ts | 2 +-
src/messaging/handler/Receiver.ts | 2 +-
src/messaging/handler/ReceiverWithContext.ts | 2 +-
src/messaging/handler/Sender.ts | 2 +-
src/messaging/handler/SimplexReceiver.ts | 2 +-
.../handler/SimplexReceiverWithContext.ts | 2 +-
src/messaging/handler/SimplexSender.ts | 2 +-
src/messaging/index.ts | 12 +-
src/options/App.tsx | 8 +-
src/options/components/ErrorMessage.tsx | 4 +-
src/options/components/TextArea.tsx | 4 +-
src/options/index.tsx | 2 +-
.../command/AddBookmarkCommand.test.ts | 6 +-
test/background/command/BufferCommand.test.ts | 8 +-
.../command/BufferCommandHelper.test.ts | 6 +-
.../command/BufferDeleteCommand.test.ts | 6 +-
.../command/BufferDeletesCommand.test.ts | 6 +-
test/background/command/HelpCommand.test.ts | 2 +-
.../command/OpenCommandHelper.test.ts | 4 +-
.../background/command/QuitAllCommand.test.ts | 4 +-
test/background/command/QuitCommand.test.ts | 4 +-
test/background/command/SetCommand.test.ts | 6 +-
.../hint/OpenCommandHintAction.test.ts | 8 +-
test/background/hint/OpenHintAction.test.ts | 8 +-
.../hint/OpenImageHintAction.test.ts | 8 +-
test/background/hint/QuickHintAction.test.ts | 8 +-
.../hint/TabopenCommandHintAction.test.ts | 8 +-
.../background/hint/TabopenHintAction.test.ts | 8 +-
.../hint/WinopenCommandHintAction.test.ts | 8 +-
.../background/hint/WinopenHintAction.test.ts | 8 +-
.../hint/YankLinkTextHintAction.test.ts | 10 +-
.../background/hint/YankURLHintAction.test.ts | 10 +-
.../background/mock/MockAddonEnabledClient.ts | 11 --
.../mock/MockAddonEnabledRepository.ts | 4 +-
.../mock/MockBrowserSettingRepository.ts | 4 +-
.../mock/MockClipboardRepository.ts | 2 +-
test/background/mock/MockConsoleClient.ts | 2 +-
.../mock/MockContentMessageClient.ts | 2 +-
test/background/mock/MockFindClient.ts | 2 +-
.../mock/MockFindHistoryRepository.ts | 4 +-
test/background/mock/MockFindRepository.ts | 2 +-
test/background/mock/MockHintActionFactory.ts | 2 +-
test/background/mock/MockHintClient.ts | 2 +-
test/background/mock/MockHintRepository.ts | 2 +-
.../mock/MockLastSelectedTabRepository.ts | 2 +-
test/background/mock/MockLocalStorage.ts | 2 +-
test/background/mock/MockMarkRepository.ts | 2 +-
test/background/mock/MockNavigateClient.ts | 2 +-
test/background/mock/MockPropertyRegistry.ts | 4 +-
test/background/mock/MockPropertySettings.ts | 2 +-
.../mock/MockReadyFrameRepository.ts | 2 +-
.../background/mock/MockSettingsRepository.ts | 4 +-
test/background/mock/MockTabPresenter.ts | 2 +-
test/background/mock/MockToolbarPresenter.ts | 2 +-
test/background/mock/MockTopFrameClient.ts | 2 +-
test/background/mock/defaultTab.ts | 6 +-
.../operators/impls/CancelOperator.test.ts | 4 +-
.../operators/impls/CloseTabOperator.test.ts | 4 +-
.../impls/CloseTabRightOperator.test.ts | 4 +-
.../impls/DuplicateTabOperator.test.ts | 2 +-
.../impls/NavigateHistoryNextOperator.test.ts | 4 +-
.../impls/NavigateHistoryPrevOperator.test.ts | 4 +-
.../impls/NavigateLinkNextOperator.test.ts | 4 +-
.../impls/NavigateLinkPrevOperator.test.ts | 4 +-
.../impls/NavigateParentOperator.test.ts | 2 +-
.../impls/NavigateRootOperator.test.ts | 2 +-
.../operators/impls/OpenHomeOperator.test.ts | 4 +-
.../impls/OpenSourceOperator.test.ts | 2 +-
.../operators/impls/PinTabOperator.test.ts | 2 +-
.../operators/impls/ReloadTabOperator.test.ts | 2 +-
.../operators/impls/ReopenTabOperator.test.ts | 4 +-
.../impls/RepeatLastOperator.test.ts | 2 +-
.../impls/SelectFirstTabOperator.test.ts | 4 +-
.../impls/SelectLastTabOperator.test.ts | 4 +-
.../SelectPreviousSelectedTabOperator.test.ts | 4 +-
.../impls/SelectTabNextOperator.test.ts | 4 +-
.../impls/SelectTabPrevOperator.test.ts | 4 +-
.../impls/ShowAddBookmarkOperator.test.ts | 4 +-
.../impls/ShowBufferCommandOperator.test.ts | 4 +-
.../impls/ShowCommandOperator.test.ts | 4 +-
.../impls/ShowOpenCommandOperator.test.ts | 4 +-
.../impls/ShowTabOpenCommandOperator.test.ts | 4 +-
.../impls/ShowWinOpenCommandOperator.test.ts | 4 +-
.../operators/impls/StartFindOperator.test.ts | 4 +-
.../impls/TogglePinnedTabOperator.test.ts | 2 +-
.../operators/impls/UnpinTabOperator.test.ts | 2 +-
.../operators/impls/ZoomInOperator.test.ts | 2 +-
.../operators/impls/ZoomOutOperator.test.ts | 2 +-
.../operators/impls/ZoomResetOperator.test.ts | 2 +-
.../property/ColorSchemeProperty.test.ts | 2 +-
.../property/CompleteProperty.test.ts | 2 +-
.../property/HintcharsProperty.test.ts | 2 +-
.../property/SmoothScrollProperty.test.ts | 2 +-
.../AddonEnabledRepository.test.ts | 2 +-
.../FindHistoryRepository.test.ts | 2 +-
.../repositories/FindRepository.test.ts | 2 +-
.../repositories/HintRepository.test.ts | 2 +-
.../LastSelectedTabRepository.test.ts | 2 +-
.../repositories/MarkRepository.test.ts | 2 +-
.../repositories/ReadyFrameRepository.test.ts | 2 +-
.../settings/PropertySettings.test.ts | 4 +-
.../settings/SettingsRepository.test.ts | 2 +-
.../background/settings/StyleSettings.test.ts | 2 +-
test/background/settings/Validator.test.ts | 6 +-
.../usecases/AddonEnabledUseCase.test.ts | 6 +-
test/background/usecases/FindUseCase.test.ts | 14 +-
.../usecases/HintKeyUseCase.test.ts | 12 +-
.../usecases/HintModeUseCase.test.ts | 18 +--
.../usecases/HintTagProducer.test.ts | 2 +-
test/background/usecases/MarkHelper.test.ts | 2 +-
.../usecases/MarkJumpUseCase.test.ts | 12 +-
.../usecases/MarkSetUseCase.test.ts | 12 +-
test/console/app/reducer.test.ts | 3 +-
.../components/CompletionItem.test.tsx | 2 +-
.../components/CompletionList.test.tsx | 6 +-
.../components/CompletionTitle.test.tsx | 2 +-
.../hooks/useCompletionKeyBinds.test.ts | 2 +-
.../completion/hooks/useCursor.test.ts | 2 +-
test/console/components/ErrorMessage.test.tsx | 2 +-
test/console/components/InfoMessage.test.tsx | 2 +-
test/content/InputDriver.test.ts | 3 +-
test/content/domains/KeySequence.test.ts | 2 +-
.../mock/MockAddonEnabledRepository.ts | 4 +-
.../content/mock/MockConsoleFramePresenter.ts | 4 +-
test/content/mock/MockFocusPresenter.ts | 7 -
test/content/mock/MockScrollPresenter.ts | 49 -------
test/content/mock/MockSettingRepository.ts | 2 +-
.../presenters/HTMLElementLocator.test.ts | 2 +-
test/content/presenters/Hint.test.ts | 2 +-
test/content/presenters/HintPresenter.test.ts | 4 +-
.../usecases/AddonEnabledUseCase.test.ts | 6 +-
test/content/usecases/KeymapUseCase.test.ts | 6 +-
.../content/usecases/OperationUseCase.test.ts | 2 +-
test/messaging/handler/Receiver.test.ts | 2 +-
.../handler/ReceiverWithContext.test.ts | 2 +-
test/messaging/handler/Sender.test.ts | 2 +-
vitest.config.ts | 1 +
328 files changed, 674 insertions(+), 822 deletions(-)
delete mode 100644 src/background/repositories/BookmarkRepository.ts
delete mode 100644 src/console/completion/index.tsx
delete mode 100644 test/background/mock/MockAddonEnabledClient.ts
delete mode 100644 test/content/mock/MockFocusPresenter.ts
delete mode 100644 test/content/mock/MockScrollPresenter.ts
diff --git a/.eslintrc b/.eslintrc
index cd1a09f9..f048f8d8 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -38,6 +38,12 @@
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
+ "no-restricted-exports": ["error", {
+ "restrictDefaultExports": {
+ "direct": true,
+ "named": true
+ }
+ }],
"no-console": "error"
},
"overrides": [
diff --git a/e2e/blacklist.test.ts b/e2e/blacklist.test.ts
index 24edd19d..c45faeb1 100644
--- a/e2e/blacklist.test.ts
+++ b/e2e/blacklist.test.ts
@@ -1,6 +1,6 @@
import { test, expect } from "./lib/fixture";
import { newScrollableServer } from "./lib/servers";
-import SettingRepository from "./lib/SettingRepository";
+import { SettingRepository } from "./lib/SettingRepository";
const server = newScrollableServer();
const READY_STATE_SELECTOR =
diff --git a/e2e/clipboard.test.ts b/e2e/clipboard.test.ts
index 8deef9f6..dbc49cc0 100644
--- a/e2e/clipboard.test.ts
+++ b/e2e/clipboard.test.ts
@@ -1,6 +1,6 @@
import { test, expect } from "./lib/fixture";
import * as clipboard from "./lib/clipboard";
-import SettingRepository from "./lib/SettingRepository";
+import { SettingRepository } from "./lib/SettingRepository";
import { newNopServer } from "./lib/servers";
const server = newNopServer();
diff --git a/e2e/command.test.ts b/e2e/command.test.ts
index 997fc768..1ed65a8b 100644
--- a/e2e/command.test.ts
+++ b/e2e/command.test.ts
@@ -1,6 +1,6 @@
import { test, expect } from "./lib/fixture";
import { newNopServer } from "./lib/servers";
-import SettingRepository from "./lib/SettingRepository";
+import { SettingRepository } from "./lib/SettingRepository";
const server = newNopServer();
diff --git a/e2e/completion_open.test.ts b/e2e/completion_open.test.ts
index f6fb069f..b132c91d 100644
--- a/e2e/completion_open.test.ts
+++ b/e2e/completion_open.test.ts
@@ -1,6 +1,6 @@
import { test, expect } from "./lib/fixture";
import { newNopServer } from "./lib/servers";
-import SettingRepository from "./lib/SettingRepository";
+import { SettingRepository } from "./lib/SettingRepository";
const server = newNopServer();
diff --git a/e2e/follow_properties.test.ts b/e2e/follow_properties.test.ts
index 74369b4b..5bfa02ea 100644
--- a/e2e/follow_properties.test.ts
+++ b/e2e/follow_properties.test.ts
@@ -1,6 +1,6 @@
import { test, expect } from "./lib/fixture";
import { newSingleContentServer } from "./lib/servers";
-import SettingRepository from "./lib/SettingRepository";
+import { SettingRepository } from "./lib/SettingRepository";
const setupHintchars = async (api: typeof browser) => {
await new SettingRepository(api).save({
diff --git a/e2e/lib/SettingRepository.ts b/e2e/lib/SettingRepository.ts
index 53c68dc0..a8ff6dda 100644
--- a/e2e/lib/SettingRepository.ts
+++ b/e2e/lib/SettingRepository.ts
@@ -1,6 +1,6 @@
import type { SerializedSettings } from "../../src/settings/schema";
-export default class SettingRepository {
+export class SettingRepository {
constructor(private readonly api: typeof browser) {}
async save(serialized: SerializedSettings): Promise {
diff --git a/src/background/Application.ts b/src/background/Application.ts
index 26517e09..2ee4808f 100644
--- a/src/background/Application.ts
+++ b/src/background/Application.ts
@@ -1,18 +1,18 @@
import { injectable, inject } from "inversify";
-import BackgroundMessageListener from "./messaging/BackgroundMessageListener";
-import FindPortListener from "./messaging/FindPortListener";
-import VersionUseCase from "./usecases/VersionUseCase";
+import { BackgroundMessageListener } from "./messaging/BackgroundMessageListener";
+import { FindPortListener } from "./messaging/FindPortListener";
+import { VersionUseCase } from "./usecases/VersionUseCase";
import type { FindRepository } from "./repositories/FindRepository";
import type { ReadyFrameRepository } from "./repositories/ReadyFrameRepository";
-import SettingsEventUseCase from "./usecases/SettingsEventUseCase";
+import { SettingsEventUseCase } from "./usecases/SettingsEventUseCase";
import type { FrameClient } from "./clients/FrameClient";
-import AddonEnabledEventUseCase from "./usecases/AddonEnabledEventUseCase";
+import { AddonEnabledEventUseCase } from "./usecases/AddonEnabledEventUseCase";
import type { LastSelectedTabRepository } from "./repositories/LastSelectedTabRepository";
-import ModeUseCase from "./usecases/ModeUseCase";
-import HintModeUseCase from "./usecases/HintModeUseCase";
+import { ModeUseCase } from "./usecases/ModeUseCase";
+import { HintModeUseCase } from "./usecases/HintModeUseCase";
@injectable()
-export default class Application {
+export class Application {
constructor(
@inject(BackgroundMessageListener)
private readonly backgroundMessageListener: BackgroundMessageListener,
diff --git a/src/background/command/AddBookmarkCommand.ts b/src/background/command/AddBookmarkCommand.ts
index c5ed7f7c..51692978 100644
--- a/src/background/command/AddBookmarkCommand.ts
+++ b/src/background/command/AddBookmarkCommand.ts
@@ -1,7 +1,7 @@
import type { Command, CommandContext, Completions } from "./types";
import type { ConsoleClient } from "../clients/ConsoleClient";
-class AddBookmarkCommand implements Command {
+export class AddBookmarkCommand implements Command {
constructor(private readonly consoleClient: ConsoleClient) {}
names(): string[] {
@@ -49,5 +49,3 @@ class AddBookmarkCommand implements Command {
return this.consoleClient.showInfo(sender.tabId, message);
}
}
-
-export default AddBookmarkCommand;
diff --git a/src/background/command/BufferCommand.ts b/src/background/command/BufferCommand.ts
index dc9b38cf..671aebaf 100644
--- a/src/background/command/BufferCommand.ts
+++ b/src/background/command/BufferCommand.ts
@@ -1,8 +1,8 @@
import type { Command, CommandContext, Completions } from "./types";
import type { LastSelectedTabRepository } from "../repositories/LastSelectedTabRepository";
-import BufferCommandHelper from "./BufferCommandHelper";
+import { BufferCommandHelper } from "./BufferCommandHelper";
-class BufferCommand implements Command {
+export class BufferCommand implements Command {
constructor(
private readonly lastSelectedTabRepository: LastSelectedTabRepository,
private readonly bufferCommandHelper = new BufferCommandHelper(
@@ -87,5 +87,3 @@ class BufferCommand implements Command {
await chrome.tabs.update(tabId, { active: true });
}
}
-
-export default BufferCommand;
diff --git a/src/background/command/BufferCommandHelper.ts b/src/background/command/BufferCommandHelper.ts
index be501855..38db7b59 100644
--- a/src/background/command/BufferCommandHelper.ts
+++ b/src/background/command/BufferCommandHelper.ts
@@ -1,7 +1,7 @@
import type { Completions } from "../../shared/completions";
import type { LastSelectedTabRepository } from "../repositories/LastSelectedTabRepository";
-export default class BufferCommandHelper {
+export class BufferCommandHelper {
constructor(
private readonly lastSelectedTabRepository: LastSelectedTabRepository,
) {}
diff --git a/src/background/command/BufferDeleteCommand.ts b/src/background/command/BufferDeleteCommand.ts
index 345105d1..c501ab9a 100644
--- a/src/background/command/BufferDeleteCommand.ts
+++ b/src/background/command/BufferDeleteCommand.ts
@@ -1,7 +1,7 @@
import type { Command, CommandContext, Completions } from "./types";
-import type BufferCommandHelper from "./BufferCommandHelper";
+import type { BufferCommandHelper } from "./BufferCommandHelper";
-class BufferDeleteCommand implements Command {
+export class BufferDeleteCommand implements Command {
constructor(private readonly bufferCommandHelper: BufferCommandHelper) {}
names(): string[] {
@@ -35,5 +35,3 @@ class BufferDeleteCommand implements Command {
return chrome.tabs.remove(tabs[0].id!);
}
}
-
-export default BufferDeleteCommand;
diff --git a/src/background/command/BufferDeletesCommand.ts b/src/background/command/BufferDeletesCommand.ts
index a76f6ecd..1ec4034f 100644
--- a/src/background/command/BufferDeletesCommand.ts
+++ b/src/background/command/BufferDeletesCommand.ts
@@ -1,7 +1,7 @@
import type { Command, CommandContext, Completions } from "./types";
-import type BufferCommandHelper from "./BufferCommandHelper";
+import type { BufferCommandHelper } from "./BufferCommandHelper";
-class BDeletesCommand implements Command {
+export class BufferDeletesCommand implements Command {
constructor(private readonly bufferCommandHelper: BufferCommandHelper) {}
names(): string[] {
@@ -34,5 +34,3 @@ class BDeletesCommand implements Command {
await chrome.tabs.remove(ids);
}
}
-
-export default BDeletesCommand;
diff --git a/src/background/command/HelpCommand.ts b/src/background/command/HelpCommand.ts
index 692954f6..4f3b5a87 100644
--- a/src/background/command/HelpCommand.ts
+++ b/src/background/command/HelpCommand.ts
@@ -2,7 +2,7 @@ import type { Command, CommandContext, Completions } from "./types";
const url = "https://ueokande.github.io/vimmatic/";
-class HelpCommand implements Command {
+export class HelpCommand implements Command {
names(): string[] {
return ["h", "help"];
}
@@ -27,5 +27,3 @@ class HelpCommand implements Command {
await chrome.tabs.create({ url, active: true });
}
}
-
-export default HelpCommand;
diff --git a/src/background/command/OpenCommand.ts b/src/background/command/OpenCommand.ts
index b3dbccef..83b957f8 100644
--- a/src/background/command/OpenCommand.ts
+++ b/src/background/command/OpenCommand.ts
@@ -2,9 +2,9 @@ import type { Command, CommandContext, Completions } from "./types";
import * as urls from "../../shared/urls";
import type { SearchEngineSettings } from "../settings/SearchEngineSettings";
import type { PropertySettings } from "../settings/PropertySettings";
-import OpenCommandHelper from "./OpenCommandHelper";
+import { OpenCommandHelper } from "./OpenCommandHelper";
-class OpenCommand implements Command {
+export class OpenCommand implements Command {
constructor(
private readonly searchEngineSettings: SearchEngineSettings,
propertySettings: PropertySettings,
@@ -40,5 +40,3 @@ class OpenCommand implements Command {
await chrome.tabs.update({ url });
}
}
-
-export default OpenCommand;
diff --git a/src/background/command/OpenCommandHelper.ts b/src/background/command/OpenCommandHelper.ts
index 73eeb839..68cf0228 100644
--- a/src/background/command/OpenCommandHelper.ts
+++ b/src/background/command/OpenCommandHelper.ts
@@ -5,7 +5,7 @@ import type { PropertySettings } from "../settings/PropertySettings";
const COMPLETION_ITEM_LIMIT = 10;
-export default class OpenCommandHelper {
+export class OpenCommandHelper {
constructor(
private readonly searchEngineSettings: SearchEngineSettings,
private readonly propertySettings: PropertySettings,
diff --git a/src/background/command/QuitAllCommand.ts b/src/background/command/QuitAllCommand.ts
index d6d9ae2c..39e315d0 100644
--- a/src/background/command/QuitAllCommand.ts
+++ b/src/background/command/QuitAllCommand.ts
@@ -1,6 +1,6 @@
import type { Command, CommandContext, Completions } from "./types";
-class QuitAllCommand implements Command {
+export class QuitAllCommand implements Command {
names(): string[] {
return ["qa", "quitall"];
}
@@ -30,5 +30,3 @@ class QuitAllCommand implements Command {
await chrome.tabs.remove(ids);
}
}
-
-export default QuitAllCommand;
diff --git a/src/background/command/QuitCommand.ts b/src/background/command/QuitCommand.ts
index 9b6a5963..038c1399 100644
--- a/src/background/command/QuitCommand.ts
+++ b/src/background/command/QuitCommand.ts
@@ -1,6 +1,6 @@
import type { Completions, Command, CommandContext } from "./types";
-class QuitCommand implements Command {
+export class QuitCommand implements Command {
names(): string[] {
return ["q", "quit"];
}
@@ -28,5 +28,3 @@ class QuitCommand implements Command {
await chrome.tabs.remove(sender.tabId);
}
}
-
-export default QuitCommand;
diff --git a/src/background/command/SetCommand.ts b/src/background/command/SetCommand.ts
index d03bd721..ab8d8a5a 100644
--- a/src/background/command/SetCommand.ts
+++ b/src/background/command/SetCommand.ts
@@ -11,7 +11,7 @@ const mustNumber = (v: any): number => {
return num;
};
-class SetCommand implements Command {
+export class SetCommand implements Command {
constructor(
private readonly propretySettings: PropertySettings,
private readonly propertyRegsitry: PropertyRegistry,
@@ -160,5 +160,3 @@ class SetCommand implements Command {
}
}
}
-
-export default SetCommand;
diff --git a/src/background/command/TabOpenCommand.ts b/src/background/command/TabOpenCommand.ts
index c22087cf..b4fe7508 100644
--- a/src/background/command/TabOpenCommand.ts
+++ b/src/background/command/TabOpenCommand.ts
@@ -2,9 +2,9 @@ import type { Command, CommandContext, Completions } from "./types";
import * as urls from "../../shared/urls";
import type { SearchEngineSettings } from "../settings/SearchEngineSettings";
import type { PropertySettings } from "../settings/PropertySettings";
-import OpenCommandHelper from "./OpenCommandHelper";
+import { OpenCommandHelper } from "./OpenCommandHelper";
-class TabOpenCommand implements Command {
+export class TabOpenCommand implements Command {
constructor(
private readonly searchEngineSettings: SearchEngineSettings,
propertySettings: PropertySettings,
@@ -40,5 +40,3 @@ class TabOpenCommand implements Command {
await chrome.tabs.create({ url });
}
}
-
-export default TabOpenCommand;
diff --git a/src/background/command/WindowOpenCommand.ts b/src/background/command/WindowOpenCommand.ts
index 188c9a35..db664497 100644
--- a/src/background/command/WindowOpenCommand.ts
+++ b/src/background/command/WindowOpenCommand.ts
@@ -2,9 +2,9 @@ import type { Completions, Command, CommandContext } from "./types";
import * as urls from "../../shared/urls";
import type { SearchEngineSettings } from "../settings/SearchEngineSettings";
import type { PropertySettings } from "../settings/PropertySettings";
-import OpenCommandHelper from "./OpenCommandHelper";
+import { OpenCommandHelper } from "./OpenCommandHelper";
-class WindowOpenCommand implements Command {
+export class WindowOpenCommand implements Command {
constructor(
private readonly searchEngineSettings: SearchEngineSettings,
propertySettings: PropertySettings,
@@ -40,5 +40,3 @@ class WindowOpenCommand implements Command {
await chrome.windows.create({ url });
}
}
-
-export default WindowOpenCommand;
diff --git a/src/background/command/index.ts b/src/background/command/index.ts
index b1693eb8..4587d1c8 100644
--- a/src/background/command/index.ts
+++ b/src/background/command/index.ts
@@ -1,16 +1,16 @@
import { injectable, inject } from "inversify";
-import AddBookmarkCommand from "./AddBookmarkCommand";
-import BufferCommand from "./BufferCommand";
-import BufferDeleteCommand from "./BufferDeleteCommand";
-import BufferDeletesCommand from "./BufferDeletesCommand";
-import HelpCommand from "./HelpCommand";
-import OpenCommand from "./OpenCommand";
-import QuitAllCommand from "./QuitAllCommand";
-import QuitCommand from "./QuitCommand";
-import SetCommand from "./SetCommand";
-import TabOpenCommand from "./TabOpenCommand";
-import WindowOpenCommand from "./WindowOpenCommand";
-import BufferCommandHelper from "./BufferCommandHelper";
+import { AddBookmarkCommand } from "./AddBookmarkCommand";
+import { BufferCommand } from "./BufferCommand";
+import { BufferDeleteCommand } from "./BufferDeleteCommand";
+import { BufferDeletesCommand } from "./BufferDeletesCommand";
+import { HelpCommand } from "./HelpCommand";
+import { OpenCommand } from "./OpenCommand";
+import { QuitAllCommand } from "./QuitAllCommand";
+import { QuitCommand } from "./QuitCommand";
+import { SetCommand } from "./SetCommand";
+import { TabOpenCommand } from "./TabOpenCommand";
+import { WindowOpenCommand } from "./WindowOpenCommand";
+import { BufferCommandHelper } from "./BufferCommandHelper";
import type { PropertyRegistry } from "../property/PropertyRegistry";
import type { PropertySettings } from "../settings/PropertySettings";
import type { SearchEngineSettings } from "../settings/SearchEngineSettings";
diff --git a/src/background/controllers/CommandController.ts b/src/background/controllers/CommandController.ts
index b0ea7275..664da2c9 100644
--- a/src/background/controllers/CommandController.ts
+++ b/src/background/controllers/CommandController.ts
@@ -1,10 +1,10 @@
import { injectable, inject } from "inversify";
import type { Completions } from "../../shared/completions";
-import CommandUseCase from "../usecases/CommandUseCase";
+import { CommandUseCase } from "../usecases/CommandUseCase";
import type { RequestContext } from "../messaging/types";
@injectable()
-export default class CommandController {
+export class CommandController {
constructor(
@inject(CommandUseCase)
private readonly commandUseCase: CommandUseCase,
diff --git a/src/background/controllers/ConsoleController.ts b/src/background/controllers/ConsoleController.ts
index a71c956a..16acac91 100644
--- a/src/background/controllers/ConsoleController.ts
+++ b/src/background/controllers/ConsoleController.ts
@@ -1,9 +1,9 @@
import { injectable, inject } from "inversify";
-import ConsoleUseCase from "../usecases/ConsoleUseCase";
+import { ConsoleUseCase } from "../usecases/ConsoleUseCase";
import type { RequestContext } from "../messaging/types";
@injectable()
-export default class ConsoleController {
+export class ConsoleController {
constructor(
@inject(ConsoleUseCase)
private readonly consoleUseCase: ConsoleUseCase,
diff --git a/src/background/controllers/FindController.ts b/src/background/controllers/FindController.ts
index 20faa196..56408bb2 100644
--- a/src/background/controllers/FindController.ts
+++ b/src/background/controllers/FindController.ts
@@ -1,10 +1,10 @@
import { injectable, inject } from "inversify";
import type { Completions } from "../../shared/completions";
-import FindUseCase from "../usecases/FindUseCase";
+import { FindUseCase } from "../usecases/FindUseCase";
import type { RequestContext } from "../messaging/types";
@injectable()
-export default class FindController {
+export class FindController {
constructor(
@inject(FindUseCase)
private findUseCase: FindUseCase,
diff --git a/src/background/controllers/KeyController.ts b/src/background/controllers/KeyController.ts
index 0633288f..73bc5225 100644
--- a/src/background/controllers/KeyController.ts
+++ b/src/background/controllers/KeyController.ts
@@ -1,20 +1,20 @@
import { injectable, inject } from "inversify";
import type { RequestContext } from "../messaging/types";
-import MarkJumpUseCase from "../usecases/MarkJumpUseCase";
-import MarkSetUseCase from "../usecases/MarkSetUseCase";
-import HintModeUseCaes from "../usecases/HintModeUseCase";
-import HintKeyUseCase from "../usecases/HintKeyUseCase";
-import ModeUseCase from "../usecases/ModeUseCase";
+import { MarkJumpUseCase } from "../usecases/MarkJumpUseCase";
+import { MarkSetUseCase } from "../usecases/MarkSetUseCase";
+import { HintModeUseCase } from "../usecases/HintModeUseCase";
+import { HintKeyUseCase } from "../usecases/HintKeyUseCase";
+import { ModeUseCase } from "../usecases/ModeUseCase";
@injectable()
-export default class KeyController {
+export class KeyController {
constructor(
@inject(MarkSetUseCase)
private readonly markSetUseCase: MarkSetUseCase,
@inject(MarkJumpUseCase)
private readonly markJumpUseCase: MarkJumpUseCase,
- @inject(HintModeUseCaes)
- private readonly hintModeUseCaes: HintModeUseCaes,
+ @inject(HintModeUseCase)
+ private readonly hintModeUseCase: HintModeUseCase,
@inject(HintKeyUseCase)
private readonly hintKeyUseCase: HintKeyUseCase,
@inject(ModeUseCase)
@@ -30,7 +30,7 @@ export default class KeyController {
if (mode === "follow") {
const continued = await this.hintKeyUseCase.pressKey(sender.tab.id, key);
if (!continued) {
- await this.hintModeUseCaes.stop(sender.tab.id);
+ await this.hintModeUseCase.stop(sender.tab.id);
await this.modeUseCase.resetMode(sender.tab.id);
}
} else if (mode === "mark-set") {
diff --git a/src/background/controllers/OperationController.ts b/src/background/controllers/OperationController.ts
index e029f50a..9c9ac6fb 100644
--- a/src/background/controllers/OperationController.ts
+++ b/src/background/controllers/OperationController.ts
@@ -1,10 +1,10 @@
import { inject, injectable } from "inversify";
import type { Operation } from "../../shared/operation";
import type { RequestContext } from "../messaging/types";
-import OperationUseCase from "../usecases/OperationUseCase";
+import { OperationUseCase } from "../usecases/OperationUseCase";
@injectable()
-export default class OperationController {
+export class OperationController {
constructor(
@inject(OperationUseCase)
private readonly operationUseCase: OperationUseCase,
diff --git a/src/background/controllers/SettingsController.ts b/src/background/controllers/SettingsController.ts
index 65703cd7..dc285d52 100644
--- a/src/background/controllers/SettingsController.ts
+++ b/src/background/controllers/SettingsController.ts
@@ -1,9 +1,9 @@
import { injectable, inject } from "inversify";
-import SettingsUseCase from "../usecases/SettingsUseCase";
+import { SettingsUseCase } from "../usecases/SettingsUseCase";
import type { RequestContext } from "../messaging/types";
@injectable()
-export default class SettingsController {
+export class SettingsController {
constructor(
@inject(SettingsUseCase)
private readonly settingsUseCase: SettingsUseCase,
diff --git a/src/background/controllers/VersionController.ts b/src/background/controllers/VersionController.ts
index ced5b721..b5cd6b0a 100644
--- a/src/background/controllers/VersionController.ts
+++ b/src/background/controllers/VersionController.ts
@@ -1,8 +1,8 @@
import { injectable, inject } from "inversify";
-import VersionUseCase from "../usecases/VersionUseCase";
+import { VersionUseCase } from "../usecases/VersionUseCase";
@injectable()
-export default class VersionController {
+export class VersionController {
constructor(
@inject(VersionUseCase)
private readonly versionUseCase: VersionUseCase,
diff --git a/src/background/hint/HintActionFactory.ts b/src/background/hint/HintActionFactory.ts
index 8244abf0..175239cb 100644
--- a/src/background/hint/HintActionFactory.ts
+++ b/src/background/hint/HintActionFactory.ts
@@ -1,15 +1,15 @@
import { injectable, inject } from "inversify";
-import QuickHintAction from "./QuickHintAction";
-import OpenImageHintAction from "./OpenImageHintAction";
-import YankURLHintAction from "./YankURLHintAction";
-import YankLinkTextHintAction from "./YankLinkTextHintAction";
-import OpenHintAction from "./OpenHintAction";
-import TabopenHintAction from "./TabopenHintAction";
-import WinopenHintAction from "./WinopenHintAction";
-import OpenCommandHintAction from "./OpenCommandHintAction";
-import TabopenCommandHintAction from "./TabopenCommandHintAction";
-import WinopenCommandHintAction from "./WinopenCommandHintAction";
-import OpenSourceHintAction from "./OpenSourceHintAction";
+import { QuickHintAction } from "./QuickHintAction";
+import { OpenImageHintAction } from "./OpenImageHintAction";
+import { YankURLHintAction } from "./YankURLHintAction";
+import { YankLinkTextHintAction } from "./YankLinkTextHintAction";
+import { OpenHintAction } from "./OpenHintAction";
+import { TabopenHintAction } from "./TabopenHintAction";
+import { WinopenHintAction } from "./WinopenHintAction";
+import { OpenCommandHintAction } from "./OpenCommandHintAction";
+import { TabopenCommandHintAction } from "./TabopenCommandHintAction";
+import { WinopenCommandHintAction } from "./WinopenCommandHintAction";
+import { OpenSourceHintAction } from "./OpenSourceHintAction";
import type { HintAction } from "./types";
export interface HintActionFactory {
diff --git a/src/background/hint/OpenCommandHintAction.ts b/src/background/hint/OpenCommandHintAction.ts
index 37ad17e1..a4be5ad9 100644
--- a/src/background/hint/OpenCommandHintAction.ts
+++ b/src/background/hint/OpenCommandHintAction.ts
@@ -4,7 +4,7 @@ import type { HintTarget, HintAction } from "./types";
import type { ConsoleClient } from "../clients/ConsoleClient";
@injectable()
-export default class OpenCommandHintAction implements HintAction {
+export class OpenCommandHintAction implements HintAction {
constructor(
@inject("HintClient")
private readonly hintClient: HintClient,
diff --git a/src/background/hint/OpenHintAction.ts b/src/background/hint/OpenHintAction.ts
index e579d34d..a34863ed 100644
--- a/src/background/hint/OpenHintAction.ts
+++ b/src/background/hint/OpenHintAction.ts
@@ -4,7 +4,7 @@ import type { HintTarget, HintAction } from "./types";
import type { TabPresenter } from "../presenters/TabPresenter";
@injectable()
-export default class OpenHintAction implements HintAction {
+export class OpenHintAction implements HintAction {
constructor(
@inject("HintClient")
private readonly hintClient: HintClient,
diff --git a/src/background/hint/OpenImageHintAction.ts b/src/background/hint/OpenImageHintAction.ts
index c46893c3..532ddd04 100644
--- a/src/background/hint/OpenImageHintAction.ts
+++ b/src/background/hint/OpenImageHintAction.ts
@@ -4,7 +4,7 @@ import type { HintTarget, HintAction } from "./types";
import type { TabPresenter } from "../presenters/TabPresenter";
@injectable()
-export default class OpenImageHintAction implements HintAction {
+export class OpenImageHintAction implements HintAction {
constructor(
@inject("HintClient")
private readonly hintClient: HintClient,
diff --git a/src/background/hint/OpenSourceHintAction.ts b/src/background/hint/OpenSourceHintAction.ts
index 4ac1c612..88f23207 100644
--- a/src/background/hint/OpenSourceHintAction.ts
+++ b/src/background/hint/OpenSourceHintAction.ts
@@ -4,7 +4,7 @@ import type { HintTarget, HintAction } from "./types";
import type { TabPresenter } from "../presenters/TabPresenter";
@injectable()
-export default class OpenSourceHintAction implements HintAction {
+export class OpenSourceHintAction implements HintAction {
constructor(
@inject("HintClient")
private readonly hintClient: HintClient,
diff --git a/src/background/hint/QuickHintAction.ts b/src/background/hint/QuickHintAction.ts
index 25ec3d99..2073d3c3 100644
--- a/src/background/hint/QuickHintAction.ts
+++ b/src/background/hint/QuickHintAction.ts
@@ -5,7 +5,7 @@ import type { TabPresenter } from "../presenters/TabPresenter";
import type { HintTarget, HintAction } from "./types";
@injectable()
-export default class QuickHintAction implements HintAction {
+export class QuickHintAction implements HintAction {
constructor(
@inject("HintClient")
private readonly hintClient: HintClient,
diff --git a/src/background/hint/TabopenCommandHintAction.ts b/src/background/hint/TabopenCommandHintAction.ts
index 6347e84a..ffe2104f 100644
--- a/src/background/hint/TabopenCommandHintAction.ts
+++ b/src/background/hint/TabopenCommandHintAction.ts
@@ -4,7 +4,7 @@ import type { HintTarget, HintAction } from "./types";
import type { ConsoleClient } from "../clients/ConsoleClient";
@injectable()
-export default class TabopenCommandHintAction implements HintAction {
+export class TabopenCommandHintAction implements HintAction {
constructor(
@inject("HintClient")
private readonly hintClient: HintClient,
diff --git a/src/background/hint/TabopenHintAction.ts b/src/background/hint/TabopenHintAction.ts
index 296f5d75..4bfb24e2 100644
--- a/src/background/hint/TabopenHintAction.ts
+++ b/src/background/hint/TabopenHintAction.ts
@@ -4,7 +4,7 @@ import type { HintTarget, HintAction } from "./types";
import type { TabPresenter } from "../presenters/TabPresenter";
@injectable()
-export default class TabopenHintAction implements HintAction {
+export class TabopenHintAction implements HintAction {
constructor(
@inject("HintClient")
private readonly hintClient: HintClient,
diff --git a/src/background/hint/WinopenCommandHintAction.ts b/src/background/hint/WinopenCommandHintAction.ts
index c58982b5..4c16df30 100644
--- a/src/background/hint/WinopenCommandHintAction.ts
+++ b/src/background/hint/WinopenCommandHintAction.ts
@@ -4,7 +4,7 @@ import type { HintTarget, HintAction } from "./types";
import type { ConsoleClient } from "../clients/ConsoleClient";
@injectable()
-export default class WinopenCommandHintAction implements HintAction {
+export class WinopenCommandHintAction implements HintAction {
constructor(
@inject("HintClient")
private readonly hintClient: HintClient,
diff --git a/src/background/hint/WinopenHintAction.ts b/src/background/hint/WinopenHintAction.ts
index af8e3b1e..358029d1 100644
--- a/src/background/hint/WinopenHintAction.ts
+++ b/src/background/hint/WinopenHintAction.ts
@@ -4,7 +4,7 @@ import type { HintTarget, HintAction } from "./types";
import type { TabPresenter } from "../presenters/TabPresenter";
@injectable()
-export default class WinopenHintAction implements HintAction {
+export class WinopenHintAction implements HintAction {
constructor(
@inject("HintClient")
private readonly hintClient: HintClient,
diff --git a/src/background/hint/YankLinkTextHintAction.ts b/src/background/hint/YankLinkTextHintAction.ts
index 7ea0562b..efa18054 100644
--- a/src/background/hint/YankLinkTextHintAction.ts
+++ b/src/background/hint/YankLinkTextHintAction.ts
@@ -5,7 +5,7 @@ import type { ClipboardRepository } from "../repositories/ClipboardRepository";
import type { ConsoleClient } from "../clients/ConsoleClient";
@injectable()
-export default class YankLinkTextHintAction implements HintAction {
+export class YankLinkTextHintAction implements HintAction {
constructor(
@inject("HintClient")
private readonly hintClient: HintClient,
diff --git a/src/background/hint/YankURLHintAction.ts b/src/background/hint/YankURLHintAction.ts
index 04f55931..f7fcbfab 100644
--- a/src/background/hint/YankURLHintAction.ts
+++ b/src/background/hint/YankURLHintAction.ts
@@ -5,7 +5,7 @@ import type { ClipboardRepository } from "../repositories/ClipboardRepository";
import type { ConsoleClient } from "../clients/ConsoleClient";
@injectable()
-export default class YankUrlHintAction implements HintAction {
+export class YankURLHintAction implements HintAction {
constructor(
@inject("HintClient")
private readonly hintClient: HintClient,
diff --git a/src/background/index.ts b/src/background/index.ts
index 9d32e5d8..8efba56d 100644
--- a/src/background/index.ts
+++ b/src/background/index.ts
@@ -1,5 +1,5 @@
import "@abraham/reflection";
-import Application from "./Application";
+import { Application } from "./Application";
import { container } from "./di";
const app = container.resolve(Application);
diff --git a/src/background/messaging/BackgroundMessageListener.ts b/src/background/messaging/BackgroundMessageListener.ts
index 3963d180..0c2aa766 100644
--- a/src/background/messaging/BackgroundMessageListener.ts
+++ b/src/background/messaging/BackgroundMessageListener.ts
@@ -1,17 +1,17 @@
import { injectable, inject } from "inversify";
-import CommandController from "../controllers/CommandController";
-import SettingsController from "../controllers/SettingsController";
-import OperationController from "../controllers/OperationController";
-import KeyController from "../controllers/KeyController";
-import ConsoleController from "../controllers/ConsoleController";
-import FindController from "../controllers/FindController";
+import { CommandController } from "../controllers/CommandController";
+import { SettingsController } from "../controllers/SettingsController";
+import { OperationController } from "../controllers/OperationController";
+import { KeyController } from "../controllers/KeyController";
+import { ConsoleController } from "../controllers/ConsoleController";
+import { FindController } from "../controllers/FindController";
import type { ConsoleClient } from "../clients/ConsoleClient";
import { ReceiverWithContext } from "../../messaging";
import type { Schema } from "../../messaging/schema/background";
import type { RequestContext } from "./types";
@injectable()
-export default class BackgroundMessageListener {
+export class BackgroundMessageListener {
private readonly receiver: ReceiverWithContext =
new ReceiverWithContext();
diff --git a/src/background/messaging/FindPortListener.ts b/src/background/messaging/FindPortListener.ts
index 3cea7116..47add33c 100644
--- a/src/background/messaging/FindPortListener.ts
+++ b/src/background/messaging/FindPortListener.ts
@@ -4,7 +4,7 @@ type OnConnectFunc = (port: chrome.runtime.Port) => void;
type OnDisconnectFunc = (port: chrome.runtime.Port) => void;
@injectable()
-export default class FindPortListener {
+export class FindPortListener {
constructor(
private readonly onConnect: OnConnectFunc,
private readonly onDisconnect: OnDisconnectFunc,
diff --git a/src/background/operators/impls/CancelOperator.ts b/src/background/operators/impls/CancelOperator.ts
index ee05cf89..9f964fa8 100644
--- a/src/background/operators/impls/CancelOperator.ts
+++ b/src/background/operators/impls/CancelOperator.ts
@@ -3,7 +3,7 @@ import type { Operator, OperatorContext } from "../types";
import type { ConsoleClient } from "../../clients/ConsoleClient";
@injectable()
-export default class CancelOperator implements Operator {
+export class CancelOperator implements Operator {
constructor(
@inject("ConsoleClient")
private readonly consoleClient: ConsoleClient,
diff --git a/src/background/operators/impls/CloseTabOperator.ts b/src/background/operators/impls/CloseTabOperator.ts
index 604fff2f..47ffec96 100644
--- a/src/background/operators/impls/CloseTabOperator.ts
+++ b/src/background/operators/impls/CloseTabOperator.ts
@@ -3,7 +3,7 @@ import { z } from "zod";
import type { Operator, OperatorContext } from "../types";
@injectable()
-export default class CloseTabOperator implements Operator {
+export class CloseTabOperator implements Operator {
name() {
return "tabs.close";
}
diff --git a/src/background/operators/impls/CloseTabRightOperator.ts b/src/background/operators/impls/CloseTabRightOperator.ts
index 77a05fec..813b4923 100644
--- a/src/background/operators/impls/CloseTabRightOperator.ts
+++ b/src/background/operators/impls/CloseTabRightOperator.ts
@@ -2,7 +2,7 @@ import { injectable } from "inversify";
import type { Operator } from "../types";
@injectable()
-export default class CloseTabRightOperator implements Operator {
+export class CloseTabRightOperator implements Operator {
name(): string {
return "tabs.close.right";
}
diff --git a/src/background/operators/impls/DisableAddonOperator.ts b/src/background/operators/impls/DisableAddonOperator.ts
index abceca39..cb825e4f 100644
--- a/src/background/operators/impls/DisableAddonOperator.ts
+++ b/src/background/operators/impls/DisableAddonOperator.ts
@@ -1,9 +1,9 @@
import { inject, injectable } from "inversify";
import type { Operator } from "../types";
-import AddonEnabledUseCase from "../../usecases/AddonEnabledUseCase";
+import { AddonEnabledUseCase } from "../../usecases/AddonEnabledUseCase";
@injectable()
-export default class DisableAddonOperator implements Operator {
+export class DisableAddonOperator implements Operator {
constructor(
@inject(AddonEnabledUseCase)
private readonly addonEnabledUseCase: AddonEnabledUseCase,
diff --git a/src/background/operators/impls/DuplicateTabOperator.ts b/src/background/operators/impls/DuplicateTabOperator.ts
index be8b92f6..b3cf0901 100644
--- a/src/background/operators/impls/DuplicateTabOperator.ts
+++ b/src/background/operators/impls/DuplicateTabOperator.ts
@@ -2,7 +2,7 @@ import { injectable } from "inversify";
import type { Operator, OperatorContext } from "../types";
@injectable()
-export default class DuplicateTabOperator implements Operator {
+export class DuplicateTabOperator implements Operator {
name(): string {
return "tabs.duplicate";
}
diff --git a/src/background/operators/impls/EnableAddonOperator.ts b/src/background/operators/impls/EnableAddonOperator.ts
index d90c2d52..1c148755 100644
--- a/src/background/operators/impls/EnableAddonOperator.ts
+++ b/src/background/operators/impls/EnableAddonOperator.ts
@@ -1,9 +1,9 @@
import { inject, injectable } from "inversify";
import type { Operator } from "../types";
-import AddonEnabledUseCase from "../../usecases/AddonEnabledUseCase";
+import { AddonEnabledUseCase } from "../../usecases/AddonEnabledUseCase";
@injectable()
-export default class DisableAddonOperator implements Operator {
+export class EnableAddonOperator implements Operator {
constructor(
@inject(AddonEnabledUseCase)
private readonly addonEnabledUseCase: AddonEnabledUseCase,
diff --git a/src/background/operators/impls/FindNextOperator.ts b/src/background/operators/impls/FindNextOperator.ts
index 30e2eac5..63707605 100644
--- a/src/background/operators/impls/FindNextOperator.ts
+++ b/src/background/operators/impls/FindNextOperator.ts
@@ -1,9 +1,9 @@
import { inject, injectable } from "inversify";
import type { Operator, OperatorContext } from "../types";
-import FindUseCase from "../../usecases/FindUseCase";
+import { FindUseCase } from "../../usecases/FindUseCase";
@injectable()
-export default class FindNextOperator implements Operator {
+export class FindNextOperator implements Operator {
constructor(
@inject(FindUseCase)
private readonly findUseCase: FindUseCase,
diff --git a/src/background/operators/impls/FindPrevOperator.ts b/src/background/operators/impls/FindPrevOperator.ts
index 71d64f42..a00ca7f2 100644
--- a/src/background/operators/impls/FindPrevOperator.ts
+++ b/src/background/operators/impls/FindPrevOperator.ts
@@ -1,9 +1,9 @@
import { inject, injectable } from "inversify";
import type { Operator, OperatorContext } from "../types";
-import FindUseCase from "../../usecases/FindUseCase";
+import { FindUseCase } from "../../usecases/FindUseCase";
@injectable()
-export default class FindPrevOperator implements Operator {
+export class FindPrevOperator implements Operator {
constructor(
@inject(FindUseCase)
private readonly findUseCase: FindUseCase,
diff --git a/src/background/operators/impls/FocusOperator.ts b/src/background/operators/impls/FocusOperator.ts
index 181db751..2ddd1765 100644
--- a/src/background/operators/impls/FocusOperator.ts
+++ b/src/background/operators/impls/FocusOperator.ts
@@ -3,7 +3,7 @@ import type { Operator, OperatorContext } from "../types";
import type { ContentMessageClient } from "../../clients/ContentMessageClient";
@injectable()
-export default class CancelOperator implements Operator {
+export class FocusOperator implements Operator {
constructor(
@inject("ContentMessageClient")
private readonly contentMessageClient: ContentMessageClient,
diff --git a/src/background/operators/impls/HorizontalScrollOperator.ts b/src/background/operators/impls/HorizontalScrollOperator.ts
index 78a2b73c..96544392 100644
--- a/src/background/operators/impls/HorizontalScrollOperator.ts
+++ b/src/background/operators/impls/HorizontalScrollOperator.ts
@@ -5,7 +5,7 @@ import type { ContentMessageClient } from "../../clients/ContentMessageClient";
import type { PropertySettings } from "../../settings/PropertySettings";
@injectable()
-export default class HorizontalScrollOperator implements Operator {
+export class HorizontalScrollOperator implements Operator {
constructor(
@inject("ContentMessageClient")
private readonly contentMessageClient: ContentMessageClient,
diff --git a/src/background/operators/impls/NavigateHistoryNextOperator.ts b/src/background/operators/impls/NavigateHistoryNextOperator.ts
index ebda0f4e..5b060e83 100644
--- a/src/background/operators/impls/NavigateHistoryNextOperator.ts
+++ b/src/background/operators/impls/NavigateHistoryNextOperator.ts
@@ -3,7 +3,7 @@ import type { Operator, OperatorContext } from "../types";
import type { NavigateClient } from "../../clients/NavigateClient";
@injectable()
-export default class NavigateHistoryNextOperator implements Operator {
+export class NavigateHistoryNextOperator implements Operator {
constructor(
@inject("NavigateClient")
private readonly navigateClient: NavigateClient,
diff --git a/src/background/operators/impls/NavigateHistoryPrevOperator.ts b/src/background/operators/impls/NavigateHistoryPrevOperator.ts
index 72f6def3..01011140 100644
--- a/src/background/operators/impls/NavigateHistoryPrevOperator.ts
+++ b/src/background/operators/impls/NavigateHistoryPrevOperator.ts
@@ -3,7 +3,7 @@ import type { Operator, OperatorContext } from "../types";
import type { NavigateClient } from "../../clients/NavigateClient";
@injectable()
-export default class NavigateHistoryPrevOperator implements Operator {
+export class NavigateHistoryPrevOperator implements Operator {
constructor(
@inject("NavigateClient")
private readonly navigateClient: NavigateClient,
diff --git a/src/background/operators/impls/NavigateLinkNextOperator.ts b/src/background/operators/impls/NavigateLinkNextOperator.ts
index 3b0d243d..09bd2614 100644
--- a/src/background/operators/impls/NavigateLinkNextOperator.ts
+++ b/src/background/operators/impls/NavigateLinkNextOperator.ts
@@ -3,7 +3,7 @@ import type { Operator, OperatorContext } from "../types";
import type { NavigateClient } from "../../clients/NavigateClient";
@injectable()
-export default class NavigateLinkNextOperator implements Operator {
+export class NavigateLinkNextOperator implements Operator {
constructor(
@inject("NavigateClient")
private readonly navigateClient: NavigateClient,
diff --git a/src/background/operators/impls/NavigateLinkPrevOperator.ts b/src/background/operators/impls/NavigateLinkPrevOperator.ts
index 12274947..0bb02f85 100644
--- a/src/background/operators/impls/NavigateLinkPrevOperator.ts
+++ b/src/background/operators/impls/NavigateLinkPrevOperator.ts
@@ -3,7 +3,7 @@ import type { Operator, OperatorContext } from "../types";
import type { NavigateClient } from "../../clients/NavigateClient";
@injectable()
-export default class NavigateLinkPrevOperator implements Operator {
+export class NavigateLinkPrevOperator implements Operator {
constructor(
@inject("NavigateClient")
private readonly navigateClient: NavigateClient,
diff --git a/src/background/operators/impls/NavigateParentOperator.ts b/src/background/operators/impls/NavigateParentOperator.ts
index b719b038..40a15cbb 100644
--- a/src/background/operators/impls/NavigateParentOperator.ts
+++ b/src/background/operators/impls/NavigateParentOperator.ts
@@ -2,7 +2,7 @@ import { injectable } from "inversify";
import type { Operator, OperatorContext } from "../types";
@injectable()
-export default class NavigateParentOperator implements Operator {
+export class NavigateParentOperator implements Operator {
name() {
return "navigate.parent";
}
diff --git a/src/background/operators/impls/NavigateRootOperator.ts b/src/background/operators/impls/NavigateRootOperator.ts
index 28947576..2e57c225 100644
--- a/src/background/operators/impls/NavigateRootOperator.ts
+++ b/src/background/operators/impls/NavigateRootOperator.ts
@@ -2,7 +2,7 @@ import { injectable } from "inversify";
import type { Operator, OperatorContext } from "../types";
@injectable()
-export default class NavigateRootOperator implements Operator {
+export class NavigateRootOperator implements Operator {
name() {
return "navigate.root";
}
diff --git a/src/background/operators/impls/OpenCommandHintOperator.ts b/src/background/operators/impls/OpenCommandHintOperator.ts
index f13e3db3..15c25dc9 100644
--- a/src/background/operators/impls/OpenCommandHintOperator.ts
+++ b/src/background/operators/impls/OpenCommandHintOperator.ts
@@ -1,11 +1,11 @@
import { inject, injectable } from "inversify";
import type { Operator, OperatorContext } from "../types";
-import HintModeUseCase from "../../usecases/HintModeUseCase";
-import ModeUseCase from "../../usecases/ModeUseCase";
+import { HintModeUseCase } from "../../usecases/HintModeUseCase";
+import { ModeUseCase } from "../../usecases/ModeUseCase";
import { Mode } from "../../../shared/mode";
@injectable()
-export default class OpenCommandHintOperator implements Operator {
+export class OpenCommandHintOperator implements Operator {
constructor(
@inject(HintModeUseCase)
private readonly hintModeUseCase: HintModeUseCase,
diff --git a/src/background/operators/impls/OpenHintOperator.ts b/src/background/operators/impls/OpenHintOperator.ts
index a2194390..b3c761b4 100644
--- a/src/background/operators/impls/OpenHintOperator.ts
+++ b/src/background/operators/impls/OpenHintOperator.ts
@@ -1,11 +1,11 @@
import { inject, injectable } from "inversify";
import type { Operator, OperatorContext } from "../types";
-import HintModeUseCase from "../../usecases/HintModeUseCase";
-import ModeUseCase from "../../usecases/ModeUseCase";
+import { HintModeUseCase } from "../../usecases/HintModeUseCase";
+import { ModeUseCase } from "../../usecases/ModeUseCase";
import { Mode } from "../../../shared/mode";
@injectable()
-export default class OpenHintOperator implements Operator {
+export class OpenHintOperator implements Operator {
constructor(
@inject(HintModeUseCase)
private readonly hintModeUseCase: HintModeUseCase,
diff --git a/src/background/operators/impls/OpenHomeOperator.ts b/src/background/operators/impls/OpenHomeOperator.ts
index d1ca981c..202d34dd 100644
--- a/src/background/operators/impls/OpenHomeOperator.ts
+++ b/src/background/operators/impls/OpenHomeOperator.ts
@@ -4,7 +4,7 @@ import type { Operator, OperatorContext } from "../types";
import type { BrowserSettingRepository } from "../../repositories/BrowserSettingRepository";
@injectable()
-export default class OpenHomeOperator implements Operator {
+export class OpenHomeOperator implements Operator {
constructor(
@inject("BrowserSettingRepository")
private readonly browserSettingRepository: BrowserSettingRepository,
diff --git a/src/background/operators/impls/OpenImageHintOperator.ts b/src/background/operators/impls/OpenImageHintOperator.ts
index b4804d7d..9ceebdac 100644
--- a/src/background/operators/impls/OpenImageHintOperator.ts
+++ b/src/background/operators/impls/OpenImageHintOperator.ts
@@ -1,12 +1,12 @@
import { inject, injectable } from "inversify";
import { z } from "zod";
import type { Operator, OperatorContext } from "../types";
-import HintModeUseCase from "../../usecases/HintModeUseCase";
-import ModeUseCase from "../../usecases/ModeUseCase";
+import { HintModeUseCase } from "../../usecases/HintModeUseCase";
+import { ModeUseCase } from "../../usecases/ModeUseCase";
import { Mode } from "../../../shared/mode";
@injectable()
-export default class OpenImageHintOperator implements Operator {
+export class OpenImageHintOperator implements Operator {
constructor(
@inject(HintModeUseCase)
private readonly hintModeUseCase: HintModeUseCase,
diff --git a/src/background/operators/impls/OpenSourceHintOperator.ts b/src/background/operators/impls/OpenSourceHintOperator.ts
index 35555b8c..78babcbb 100644
--- a/src/background/operators/impls/OpenSourceHintOperator.ts
+++ b/src/background/operators/impls/OpenSourceHintOperator.ts
@@ -1,12 +1,12 @@
import { inject, injectable } from "inversify";
import { z } from "zod";
import type { Operator, OperatorContext } from "../types";
-import HintModeUseCase from "../../usecases/HintModeUseCase";
-import ModeUseCase from "../../usecases/ModeUseCase";
+import { HintModeUseCase } from "../../usecases/HintModeUseCase";
+import { ModeUseCase } from "../../usecases/ModeUseCase";
import { Mode } from "../../../shared/mode";
@injectable()
-export default class OpenSourceHintOperator implements Operator {
+export class OpenSourceHintOperator implements Operator {
constructor(
@inject(HintModeUseCase)
private readonly hintModeUseCase: HintModeUseCase,
diff --git a/src/background/operators/impls/OpenSourceOperator.ts b/src/background/operators/impls/OpenSourceOperator.ts
index 81b5ce62..81158dca 100644
--- a/src/background/operators/impls/OpenSourceOperator.ts
+++ b/src/background/operators/impls/OpenSourceOperator.ts
@@ -2,7 +2,7 @@ import { injectable } from "inversify";
import type { Operator, OperatorContext } from "../types";
@injectable()
-export default class OpenSourceOperator implements Operator {
+export class OpenSourceOperator implements Operator {
name() {
return "navigate.source";
}
diff --git a/src/background/operators/impls/PageScrollOperator.ts b/src/background/operators/impls/PageScrollOperator.ts
index 5bc28b93..2acd0cda 100644
--- a/src/background/operators/impls/PageScrollOperator.ts
+++ b/src/background/operators/impls/PageScrollOperator.ts
@@ -5,7 +5,7 @@ import type { ContentMessageClient } from "../../clients/ContentMessageClient";
import type { PropertySettings } from "../../settings/PropertySettings";
@injectable()
-export default class PageScrollOperator implements Operator {
+export class PageScrollOperator implements Operator {
constructor(
@inject("ContentMessageClient")
private readonly contentMessageClient: ContentMessageClient,
diff --git a/src/background/operators/impls/PasteOperator.ts b/src/background/operators/impls/PasteOperator.ts
index b48ee042..e326967f 100644
--- a/src/background/operators/impls/PasteOperator.ts
+++ b/src/background/operators/impls/PasteOperator.ts
@@ -6,7 +6,7 @@ import type { SearchEngineSettings } from "../../settings/SearchEngineSettings";
import * as urls from "../../../shared/urls";
@injectable()
-export default class PasteOperator implements Operator {
+export class PasteOperator implements Operator {
constructor(
@inject("ClipboardRepository")
private readonly clipboard: ClipboardRepository,
diff --git a/src/background/operators/impls/PinTabOperator.ts b/src/background/operators/impls/PinTabOperator.ts
index df1bf7aa..cb6cf8e7 100644
--- a/src/background/operators/impls/PinTabOperator.ts
+++ b/src/background/operators/impls/PinTabOperator.ts
@@ -2,7 +2,7 @@ import { injectable } from "inversify";
import type { Operator } from "../types";
@injectable()
-export default class PinTabOperator implements Operator {
+export class PinTabOperator implements Operator {
name(): string {
return "tabs.pin";
}
diff --git a/src/background/operators/impls/QuickHintOperator.ts b/src/background/operators/impls/QuickHintOperator.ts
index 4a47853f..7e82dd1d 100644
--- a/src/background/operators/impls/QuickHintOperator.ts
+++ b/src/background/operators/impls/QuickHintOperator.ts
@@ -1,12 +1,12 @@
import { inject, injectable } from "inversify";
import { z } from "zod";
import type { Operator, OperatorContext } from "../types";
-import HintModeUseCase from "../../usecases/HintModeUseCase";
-import ModeUseCase from "../../usecases/ModeUseCase";
+import { HintModeUseCase } from "../../usecases/HintModeUseCase";
+import { ModeUseCase } from "../../usecases/ModeUseCase";
import { Mode } from "../../../shared/mode";
@injectable()
-export default class QuickHintOperator implements Operator {
+export class QuickHintOperator implements Operator {
constructor(
@inject(HintModeUseCase)
private readonly hintModeUseCase: HintModeUseCase,
diff --git a/src/background/operators/impls/ReloadTabOperator.ts b/src/background/operators/impls/ReloadTabOperator.ts
index 46515db7..8d570710 100644
--- a/src/background/operators/impls/ReloadTabOperator.ts
+++ b/src/background/operators/impls/ReloadTabOperator.ts
@@ -3,7 +3,7 @@ import { z } from "zod";
import type { Operator, OperatorContext } from "../types";
@injectable()
-export default class ReloadTabOperator implements Operator {
+export class ReloadTabOperator implements Operator {
name() {
return "tabs.reload";
}
diff --git a/src/background/operators/impls/ReopenTabOperator.ts b/src/background/operators/impls/ReopenTabOperator.ts
index 190bd115..319bb75b 100644
--- a/src/background/operators/impls/ReopenTabOperator.ts
+++ b/src/background/operators/impls/ReopenTabOperator.ts
@@ -2,7 +2,7 @@ import { injectable } from "inversify";
import type { Operator } from "../types";
@injectable()
-export default class ReopenTabOperator implements Operator {
+export class ReopenTabOperator implements Operator {
name() {
return "tabs.reopen";
}
diff --git a/src/background/operators/impls/RepeatLastOperator.ts b/src/background/operators/impls/RepeatLastOperator.ts
index d8130817..301cf2fd 100644
--- a/src/background/operators/impls/RepeatLastOperator.ts
+++ b/src/background/operators/impls/RepeatLastOperator.ts
@@ -4,7 +4,7 @@ import type { RepeatRepository } from "../../repositories/RepeatRepository";
import type { OperatorRegistory } from "../../operators/OperatorRegistory";
@injectable()
-export default class RepeatLastOperator implements Operator {
+export class RepeatLastOperator implements Operator {
constructor(
@inject("OperatorRegistory")
private readonly operatorRegistory: OperatorRegistory,
diff --git a/src/background/operators/impls/ScrollToBottomOperator.ts b/src/background/operators/impls/ScrollToBottomOperator.ts
index 59da8ab0..6c756150 100644
--- a/src/background/operators/impls/ScrollToBottomOperator.ts
+++ b/src/background/operators/impls/ScrollToBottomOperator.ts
@@ -4,7 +4,7 @@ import type { ContentMessageClient } from "../../clients/ContentMessageClient";
import type { PropertySettings } from "../../settings/PropertySettings";
@injectable()
-export default class ScrollToBottomOperator implements Operator {
+export class ScrollToBottomOperator implements Operator {
constructor(
@inject("ContentMessageClient")
private readonly contentMessageClient: ContentMessageClient,
diff --git a/src/background/operators/impls/ScrollToEndOperator.ts b/src/background/operators/impls/ScrollToEndOperator.ts
index 94b28760..3254fcfc 100644
--- a/src/background/operators/impls/ScrollToEndOperator.ts
+++ b/src/background/operators/impls/ScrollToEndOperator.ts
@@ -4,7 +4,7 @@ import type { ContentMessageClient } from "../../clients/ContentMessageClient";
import type { PropertySettings } from "../../settings/PropertySettings";
@injectable()
-export default class ScrollToEndOperator implements Operator {
+export class ScrollToEndOperator implements Operator {
constructor(
@inject("ContentMessageClient")
private readonly contentMessageClient: ContentMessageClient,
diff --git a/src/background/operators/impls/ScrollToHomeOperator.ts b/src/background/operators/impls/ScrollToHomeOperator.ts
index cceb339e..742b28dd 100644
--- a/src/background/operators/impls/ScrollToHomeOperator.ts
+++ b/src/background/operators/impls/ScrollToHomeOperator.ts
@@ -4,7 +4,7 @@ import type { ContentMessageClient } from "../../clients/ContentMessageClient";
import type { PropertySettings } from "../../settings/PropertySettings";
@injectable()
-export default class ScrollToHomeOperator implements Operator {
+export class ScrollToHomeOperator implements Operator {
constructor(
@inject("ContentMessageClient")
private readonly contentMessageClient: ContentMessageClient,
diff --git a/src/background/operators/impls/ScrollToTopOperator.ts b/src/background/operators/impls/ScrollToTopOperator.ts
index 271090ee..4cc0c348 100644
--- a/src/background/operators/impls/ScrollToTopOperator.ts
+++ b/src/background/operators/impls/ScrollToTopOperator.ts
@@ -4,7 +4,7 @@ import type { ContentMessageClient } from "../../clients/ContentMessageClient";
import type { PropertySettings } from "../../settings/PropertySettings";
@injectable()
-export default class ScrollToTopOperator implements Operator {
+export class ScrollToTopOperator implements Operator {
constructor(
@inject("ContentMessageClient")
private readonly contentMessageClient: ContentMessageClient,
diff --git a/src/background/operators/impls/SelectFirstTabOperator.ts b/src/background/operators/impls/SelectFirstTabOperator.ts
index 67f87792..b3060dcd 100644
--- a/src/background/operators/impls/SelectFirstTabOperator.ts
+++ b/src/background/operators/impls/SelectFirstTabOperator.ts
@@ -2,7 +2,7 @@ import { injectable } from "inversify";
import type { Operator } from "../types";
@injectable()
-export default class SelectFirstTabOperator implements Operator {
+export class SelectFirstTabOperator implements Operator {
name() {
return "tabs.first";
}
diff --git a/src/background/operators/impls/SelectLastTabOperator.ts b/src/background/operators/impls/SelectLastTabOperator.ts
index f0bfd486..ee7027ba 100644
--- a/src/background/operators/impls/SelectLastTabOperator.ts
+++ b/src/background/operators/impls/SelectLastTabOperator.ts
@@ -2,7 +2,7 @@ import { injectable } from "inversify";
import type { Operator } from "../types";
@injectable()
-export default class SelectLastTabOperator implements Operator {
+export class SelectLastTabOperator implements Operator {
name() {
return "tabs.last";
}
diff --git a/src/background/operators/impls/SelectPreviousSelectedTabOperator.ts b/src/background/operators/impls/SelectPreviousSelectedTabOperator.ts
index 02ee3ade..b10464a1 100644
--- a/src/background/operators/impls/SelectPreviousSelectedTabOperator.ts
+++ b/src/background/operators/impls/SelectPreviousSelectedTabOperator.ts
@@ -3,7 +3,7 @@ import type { Operator } from "../types";
import type { LastSelectedTabRepository } from "../../repositories/LastSelectedTabRepository";
@injectable()
-export default class SelectPreviousSelectedTabOperator implements Operator {
+export class SelectPreviousSelectedTabOperator implements Operator {
constructor(
@inject("LastSelectedTabRepository")
private readonly lastSelectedTabRepository: LastSelectedTabRepository,
diff --git a/src/background/operators/impls/SelectTabNextOperator.ts b/src/background/operators/impls/SelectTabNextOperator.ts
index 4d539b48..df752504 100644
--- a/src/background/operators/impls/SelectTabNextOperator.ts
+++ b/src/background/operators/impls/SelectTabNextOperator.ts
@@ -2,7 +2,7 @@ import { injectable } from "inversify";
import type { Operator } from "../types";
@injectable()
-export default class SelectTabNextOperator implements Operator {
+export class SelectTabNextOperator implements Operator {
name() {
return "tabs.next";
}
diff --git a/src/background/operators/impls/SelectTabPrevOperator.ts b/src/background/operators/impls/SelectTabPrevOperator.ts
index 7e64aec9..365026a0 100644
--- a/src/background/operators/impls/SelectTabPrevOperator.ts
+++ b/src/background/operators/impls/SelectTabPrevOperator.ts
@@ -2,7 +2,7 @@ import { injectable } from "inversify";
import type { Operator } from "../types";
@injectable()
-export default class SelectTabPrevOperator implements Operator {
+export class SelectTabPrevOperator implements Operator {
name() {
return "tabs.prev";
}
diff --git a/src/background/operators/impls/ShowAddBookmarkOperator.ts b/src/background/operators/impls/ShowAddBookmarkOperator.ts
index 9511b2f5..d4b68f50 100644
--- a/src/background/operators/impls/ShowAddBookmarkOperator.ts
+++ b/src/background/operators/impls/ShowAddBookmarkOperator.ts
@@ -4,7 +4,7 @@ import type { Operator, OperatorContext } from "../types";
import type { ConsoleClient } from "../../clients/ConsoleClient";
@injectable()
-export default class ShowAddBookmarkOperator implements Operator {
+export class ShowAddBookmarkOperator implements Operator {
constructor(
@inject("ConsoleClient")
private readonly consoleClient: ConsoleClient,
diff --git a/src/background/operators/impls/ShowBufferCommandOperator.ts b/src/background/operators/impls/ShowBufferCommandOperator.ts
index bd9ebf4b..4f231fb1 100644
--- a/src/background/operators/impls/ShowBufferCommandOperator.ts
+++ b/src/background/operators/impls/ShowBufferCommandOperator.ts
@@ -3,7 +3,7 @@ import type { Operator, OperatorContext } from "../types";
import type { ConsoleClient } from "../../clients/ConsoleClient";
@injectable()
-export default class ShowBufferCommandOperator implements Operator {
+export class ShowBufferCommandOperator implements Operator {
constructor(
@inject("ConsoleClient")
private readonly consoleClient: ConsoleClient,
diff --git a/src/background/operators/impls/ShowCommandOperator.ts b/src/background/operators/impls/ShowCommandOperator.ts
index 88de3813..b126db5b 100644
--- a/src/background/operators/impls/ShowCommandOperator.ts
+++ b/src/background/operators/impls/ShowCommandOperator.ts
@@ -3,7 +3,7 @@ import type { Operator, OperatorContext } from "../types";
import type { ConsoleClient } from "../../clients/ConsoleClient";
@injectable()
-export default class ShowCommandOperator implements Operator {
+export class ShowCommandOperator implements Operator {
constructor(
@inject("ConsoleClient")
private readonly consoleClient: ConsoleClient,
diff --git a/src/background/operators/impls/ShowOpenCommandOperator.ts b/src/background/operators/impls/ShowOpenCommandOperator.ts
index 6a49071c..87c039d8 100644
--- a/src/background/operators/impls/ShowOpenCommandOperator.ts
+++ b/src/background/operators/impls/ShowOpenCommandOperator.ts
@@ -4,7 +4,7 @@ import type { Operator, OperatorContext } from "../types";
import type { ConsoleClient } from "../../clients/ConsoleClient";
@injectable()
-export default class ShowOpenCommandOperator implements Operator {
+export class ShowOpenCommandOperator implements Operator {
constructor(
@inject("ConsoleClient")
private readonly consoleClient: ConsoleClient,
diff --git a/src/background/operators/impls/ShowTabOpenCommandOperator.ts b/src/background/operators/impls/ShowTabOpenCommandOperator.ts
index 006a97ca..5ffff387 100644
--- a/src/background/operators/impls/ShowTabOpenCommandOperator.ts
+++ b/src/background/operators/impls/ShowTabOpenCommandOperator.ts
@@ -4,7 +4,7 @@ import type { Operator, OperatorContext } from "../types";
import type { ConsoleClient } from "../../clients/ConsoleClient";
@injectable()
-export default class ShowTabOpenCommandOperator implements Operator {
+export class ShowTabOpenCommandOperator implements Operator {
constructor(
@inject("ConsoleClient")
private readonly consoleClient: ConsoleClient,
diff --git a/src/background/operators/impls/ShowWinOpenCommandOperator.ts b/src/background/operators/impls/ShowWinOpenCommandOperator.ts
index 28fb6cd8..7f6195be 100644
--- a/src/background/operators/impls/ShowWinOpenCommandOperator.ts
+++ b/src/background/operators/impls/ShowWinOpenCommandOperator.ts
@@ -4,7 +4,7 @@ import type { Operator, OperatorContext } from "../types";
import type { ConsoleClient } from "../../clients/ConsoleClient";
@injectable()
-export default class ShowWinOpenCommandOperator implements Operator {
+export class ShowWinOpenCommandOperator implements Operator {
constructor(
@inject("ConsoleClient")
private readonly consoleClient: ConsoleClient,
diff --git a/src/background/operators/impls/StartFindOperator.ts b/src/background/operators/impls/StartFindOperator.ts
index f5ef8410..9678f3b3 100644
--- a/src/background/operators/impls/StartFindOperator.ts
+++ b/src/background/operators/impls/StartFindOperator.ts
@@ -3,7 +3,7 @@ import type { Operator, OperatorContext } from "../types";
import type { ConsoleClient } from "../../clients/ConsoleClient";
@injectable()
-export default class StartFindOperator implements Operator {
+export class StartFindOperator implements Operator {
constructor(
@inject("ConsoleClient")
private readonly consoleClient: ConsoleClient,
diff --git a/src/background/operators/impls/StartFollowOperator.ts b/src/background/operators/impls/StartFollowOperator.ts
index 54b5eabd..17afa7d7 100644
--- a/src/background/operators/impls/StartFollowOperator.ts
+++ b/src/background/operators/impls/StartFollowOperator.ts
@@ -1,9 +1,9 @@
import { injectable } from "inversify";
-import QuickHintOperator from "./QuickHintOperator";
+import { QuickHintOperator } from "./QuickHintOperator";
// "follow.start" is an alias of "quick.hint"
@injectable()
-export default class StartFollowOperator extends QuickHintOperator {
+export class StartFollowOperator extends QuickHintOperator {
name(): string {
return "follow.start";
}
diff --git a/src/background/operators/impls/StartJumpMarkOperator.ts b/src/background/operators/impls/StartJumpMarkOperator.ts
index 8f57d7b9..36504ca2 100644
--- a/src/background/operators/impls/StartJumpMarkOperator.ts
+++ b/src/background/operators/impls/StartJumpMarkOperator.ts
@@ -1,10 +1,10 @@
import { injectable, inject } from "inversify";
import type { Operator, OperatorContext } from "../types";
-import ModeUseCase from "../../usecases/ModeUseCase";
+import { ModeUseCase } from "../../usecases/ModeUseCase";
import { Mode } from "../../../shared/mode";
@injectable()
-export default class StartJumpMarkOperator implements Operator {
+export class StartJumpMarkOperator implements Operator {
constructor(
@inject(ModeUseCase)
private readonly modeUseCase: ModeUseCase,
diff --git a/src/background/operators/impls/StartSetMarkOperator.ts b/src/background/operators/impls/StartSetMarkOperator.ts
index c462a16e..00f218e8 100644
--- a/src/background/operators/impls/StartSetMarkOperator.ts
+++ b/src/background/operators/impls/StartSetMarkOperator.ts
@@ -1,10 +1,10 @@
import { injectable, inject } from "inversify";
import type { Operator, OperatorContext } from "../types";
-import ModeUseCase from "../../usecases/ModeUseCase";
+import { ModeUseCase } from "../../usecases/ModeUseCase";
import { Mode } from "../../../shared/mode";
@injectable()
-export default class StartSetMarkOperator implements Operator {
+export class StartSetMarkOperator implements Operator {
constructor(
@inject(ModeUseCase)
private readonly modeUseCase: ModeUseCase,
diff --git a/src/background/operators/impls/TabopenCommandHintOperator.ts b/src/background/operators/impls/TabopenCommandHintOperator.ts
index 7a50101a..7205ec74 100644
--- a/src/background/operators/impls/TabopenCommandHintOperator.ts
+++ b/src/background/operators/impls/TabopenCommandHintOperator.ts
@@ -1,11 +1,11 @@
import { inject, injectable } from "inversify";
import type { Operator, OperatorContext } from "../types";
-import HintModeUseCase from "../../usecases/HintModeUseCase";
-import ModeUseCase from "../../usecases/ModeUseCase";
+import { HintModeUseCase } from "../../usecases/HintModeUseCase";
+import { ModeUseCase } from "../../usecases/ModeUseCase";
import { Mode } from "../../../shared/mode";
@injectable()
-export default class TabopenCommandHintOperator implements Operator {
+export class TabopenCommandHintOperator implements Operator {
constructor(
@inject(HintModeUseCase)
private readonly hintModeUseCase: HintModeUseCase,
diff --git a/src/background/operators/impls/TabopenHintOperator.ts b/src/background/operators/impls/TabopenHintOperator.ts
index d4436e08..fe750cab 100644
--- a/src/background/operators/impls/TabopenHintOperator.ts
+++ b/src/background/operators/impls/TabopenHintOperator.ts
@@ -1,11 +1,11 @@
import { inject, injectable } from "inversify";
import type { Operator, OperatorContext } from "../types";
-import HintModeUseCase from "../../usecases/HintModeUseCase";
-import ModeUseCase from "../../usecases/ModeUseCase";
+import { HintModeUseCase } from "../../usecases/HintModeUseCase";
+import { ModeUseCase } from "../../usecases/ModeUseCase";
import { Mode } from "../../../shared/mode";
@injectable()
-export default class TabopenHintOperator implements Operator {
+export class TabopenHintOperator implements Operator {
constructor(
@inject(HintModeUseCase)
private readonly hintModeUseCase: HintModeUseCase,
diff --git a/src/background/operators/impls/ToggleAddonOperator.ts b/src/background/operators/impls/ToggleAddonOperator.ts
index bcf77b81..309345a8 100644
--- a/src/background/operators/impls/ToggleAddonOperator.ts
+++ b/src/background/operators/impls/ToggleAddonOperator.ts
@@ -1,9 +1,9 @@
import { inject, injectable } from "inversify";
import type { Operator } from "../types";
-import AddonEnabledUseCase from "../../usecases/AddonEnabledUseCase";
+import { AddonEnabledUseCase } from "../../usecases/AddonEnabledUseCase";
@injectable()
-export default class ToggleAddonOperator implements Operator {
+export class ToggleAddonOperator implements Operator {
constructor(
@inject(AddonEnabledUseCase)
private readonly addonEnabledUseCase: AddonEnabledUseCase,
diff --git a/src/background/operators/impls/TogglePinnedTabOperator.ts b/src/background/operators/impls/TogglePinnedTabOperator.ts
index 96164b8a..aa06fe45 100644
--- a/src/background/operators/impls/TogglePinnedTabOperator.ts
+++ b/src/background/operators/impls/TogglePinnedTabOperator.ts
@@ -2,7 +2,7 @@ import { injectable } from "inversify";
import type { Operator, OperatorContext } from "../types";
@injectable()
-export default class TogglePinnedTabOperator implements Operator {
+export class TogglePinnedTabOperator implements Operator {
name(): string {
return "tabs.pin.toggle";
}
diff --git a/src/background/operators/impls/ToggleReaderOperator.ts b/src/background/operators/impls/ToggleReaderOperator.ts
index 7e8f8b1b..8ba237e7 100644
--- a/src/background/operators/impls/ToggleReaderOperator.ts
+++ b/src/background/operators/impls/ToggleReaderOperator.ts
@@ -2,7 +2,7 @@ import { injectable } from "inversify";
import type { Operator } from "../types";
@injectable()
-export default class ToggleReaderOperator implements Operator {
+export class ToggleReaderOperator implements Operator {
name() {
return "tabs.reader.toggle";
}
diff --git a/src/background/operators/impls/UnpinTabOperator.ts b/src/background/operators/impls/UnpinTabOperator.ts
index 4848442c..7cb0cc8b 100644
--- a/src/background/operators/impls/UnpinTabOperator.ts
+++ b/src/background/operators/impls/UnpinTabOperator.ts
@@ -2,7 +2,7 @@ import { injectable } from "inversify";
import type { Operator } from "../types";
@injectable()
-export default class UnpinTabOperator implements Operator {
+export class UnpinTabOperator implements Operator {
name(): string {
return "tabs.unpin";
}
diff --git a/src/background/operators/impls/VerticalScrollOperator.ts b/src/background/operators/impls/VerticalScrollOperator.ts
index f62862be..0c3f83af 100644
--- a/src/background/operators/impls/VerticalScrollOperator.ts
+++ b/src/background/operators/impls/VerticalScrollOperator.ts
@@ -5,7 +5,7 @@ import type { ContentMessageClient } from "../../clients/ContentMessageClient";
import type { PropertySettings } from "../../settings/PropertySettings";
@injectable()
-export default class VerticalScrollOperator implements Operator {
+export class VerticalScrollOperator implements Operator {
constructor(
@inject("ContentMessageClient")
private readonly contentMessageClient: ContentMessageClient,
diff --git a/src/background/operators/impls/WinopenCommandHintOperator.ts b/src/background/operators/impls/WinopenCommandHintOperator.ts
index e771cde6..4e7fcb1c 100644
--- a/src/background/operators/impls/WinopenCommandHintOperator.ts
+++ b/src/background/operators/impls/WinopenCommandHintOperator.ts
@@ -1,11 +1,11 @@
import { inject, injectable } from "inversify";
import type { Operator, OperatorContext } from "../types";
-import HintModeUseCase from "../../usecases/HintModeUseCase";
-import ModeUseCase from "../../usecases/ModeUseCase";
+import { HintModeUseCase } from "../../usecases/HintModeUseCase";
+import { ModeUseCase } from "../../usecases/ModeUseCase";
import { Mode } from "../../../shared/mode";
@injectable()
-export default class WinopenCommandHintOperator implements Operator {
+export class WinopenCommandHintOperator implements Operator {
constructor(
@inject(HintModeUseCase)
private readonly hintModeUseCase: HintModeUseCase,
diff --git a/src/background/operators/impls/WinopenHintOperator.ts b/src/background/operators/impls/WinopenHintOperator.ts
index 09147a06..d13c2e4f 100644
--- a/src/background/operators/impls/WinopenHintOperator.ts
+++ b/src/background/operators/impls/WinopenHintOperator.ts
@@ -1,11 +1,11 @@
import { inject, injectable } from "inversify";
import type { Operator, OperatorContext } from "../types";
-import HintModeUseCase from "../../usecases/HintModeUseCase";
-import ModeUseCase from "../../usecases/ModeUseCase";
+import { HintModeUseCase } from "../../usecases/HintModeUseCase";
+import { ModeUseCase } from "../../usecases/ModeUseCase";
import { Mode } from "../../../shared/mode";
@injectable()
-export default class WinopenHintOperator implements Operator {
+export class WinopenHintOperator implements Operator {
constructor(
@inject(HintModeUseCase)
private readonly hintModeUseCase: HintModeUseCase,
diff --git a/src/background/operators/impls/YankLinkTextOperator.ts b/src/background/operators/impls/YankLinkTextOperator.ts
index 960da074..c6648d10 100644
--- a/src/background/operators/impls/YankLinkTextOperator.ts
+++ b/src/background/operators/impls/YankLinkTextOperator.ts
@@ -1,11 +1,11 @@
import { inject, injectable } from "inversify";
import type { Operator, OperatorContext } from "../types";
-import HintModeUseCase from "../../usecases/HintModeUseCase";
-import ModeUseCase from "../../usecases/ModeUseCase";
+import { HintModeUseCase } from "../../usecases/HintModeUseCase";
+import { ModeUseCase } from "../../usecases/ModeUseCase";
import { Mode } from "../../../shared/mode";
@injectable()
-export default class YankLinkTextOperator implements Operator {
+export class YankLinkTextOperator implements Operator {
constructor(
@inject(HintModeUseCase)
private readonly hintModeUseCase: HintModeUseCase,
diff --git a/src/background/operators/impls/YankOperator.ts b/src/background/operators/impls/YankOperator.ts
index f1864b25..3cc7b0ab 100644
--- a/src/background/operators/impls/YankOperator.ts
+++ b/src/background/operators/impls/YankOperator.ts
@@ -4,7 +4,7 @@ import type { ClipboardRepository } from "../../repositories/ClipboardRepository
import type { ConsoleClient } from "../../clients/ConsoleClient";
@injectable()
-export default class YankOperator implements Operator {
+export class YankOperator implements Operator {
constructor(
@inject("ClipboardRepository")
private readonly clipboard: ClipboardRepository,
diff --git a/src/background/operators/impls/YankURLHintOperator.ts b/src/background/operators/impls/YankURLHintOperator.ts
index 6a94811a..d21a431a 100644
--- a/src/background/operators/impls/YankURLHintOperator.ts
+++ b/src/background/operators/impls/YankURLHintOperator.ts
@@ -1,11 +1,11 @@
import { inject, injectable } from "inversify";
import type { Operator, OperatorContext } from "../types";
-import HintModeUseCase from "../../usecases/HintModeUseCase";
-import ModeUseCase from "../../usecases/ModeUseCase";
+import { HintModeUseCase } from "../../usecases/HintModeUseCase";
+import { ModeUseCase } from "../../usecases/ModeUseCase";
import { Mode } from "../../../shared/mode";
@injectable()
-export default class YankURLHintOperator implements Operator {
+export class YankURLHintOperator implements Operator {
constructor(
@inject(HintModeUseCase)
private readonly hintModeUseCase: HintModeUseCase,
diff --git a/src/background/operators/impls/ZoomHelper.ts b/src/background/operators/impls/ZoomHelper.ts
index 01a5ce02..e47783aa 100644
--- a/src/background/operators/impls/ZoomHelper.ts
+++ b/src/background/operators/impls/ZoomHelper.ts
@@ -2,7 +2,7 @@ const ZOOM_SETTINGS = [
0.33, 0.5, 0.66, 0.75, 0.8, 0.9, 1.0, 1.1, 1.25, 1.5, 1.75, 2.0, 2.5, 3.0,
] as const;
-class ZoomPresenter {
+export class ZoomHelper {
async zoomIn(tabId: number): Promise {
const current = await chrome.tabs.getZoom(tabId);
const factor = ZOOM_SETTINGS.find((f) => f > current);
@@ -21,5 +21,3 @@ class ZoomPresenter {
}
}
}
-
-export default ZoomPresenter;
diff --git a/src/background/operators/impls/ZoomInOperator.ts b/src/background/operators/impls/ZoomInOperator.ts
index 1d9dac89..6ba8d50e 100644
--- a/src/background/operators/impls/ZoomInOperator.ts
+++ b/src/background/operators/impls/ZoomInOperator.ts
@@ -1,9 +1,9 @@
import { injectable } from "inversify";
import type { Operator, OperatorContext } from "../types";
-import ZoomHelper from "./ZoomHelper";
+import { ZoomHelper } from "./ZoomHelper";
@injectable()
-export default class ZoomInOperator implements Operator {
+export class ZoomInOperator implements Operator {
private readonly zoomHelper = new ZoomHelper();
name() {
diff --git a/src/background/operators/impls/ZoomOutOperator.ts b/src/background/operators/impls/ZoomOutOperator.ts
index 2156256a..68ef9f99 100644
--- a/src/background/operators/impls/ZoomOutOperator.ts
+++ b/src/background/operators/impls/ZoomOutOperator.ts
@@ -1,9 +1,9 @@
import { injectable } from "inversify";
import type { Operator, OperatorContext } from "../types";
-import ZoomHelper from "./ZoomHelper";
+import { ZoomHelper } from "./ZoomHelper";
@injectable()
-export default class ZoomOutOperator implements Operator {
+export class ZoomOutOperator implements Operator {
private readonly zoomHelper = new ZoomHelper();
name() {
diff --git a/src/background/operators/impls/ZoomResetOperator.ts b/src/background/operators/impls/ZoomResetOperator.ts
index eae9848f..47be0e99 100644
--- a/src/background/operators/impls/ZoomResetOperator.ts
+++ b/src/background/operators/impls/ZoomResetOperator.ts
@@ -2,7 +2,7 @@ import { injectable } from "inversify";
import type { Operator } from "../types";
@injectable()
-export default class ResetZoomOperator implements Operator {
+export class ZoomResetOperator implements Operator {
name() {
return "zoom.neutral";
}
diff --git a/src/background/operators/index.ts b/src/background/operators/index.ts
index 2cfb9d07..0004710f 100644
--- a/src/background/operators/index.ts
+++ b/src/background/operators/index.ts
@@ -1,68 +1,68 @@
import { inject, injectable } from "inversify";
import type { OperatorRegistory } from "./OperatorRegistory";
-import EnableAddonOperator from "./impls/EnableAddonOperator";
-import DisableAddonOperator from "./impls/DisableAddonOperator";
-import ToggleAddonOperator from "./impls/ToggleAddonOperator";
-import CancelOperator from "./impls/CancelOperator";
-import CloseTabOperator from "./impls/CloseTabOperator";
-import CloseTabRightOperator from "./impls/CloseTabRightOperator";
-import DuplicateTabOperator from "./impls/DuplicateTabOperator";
-import FindNextOperator from "./impls/FindNextOperator";
-import FindPrevOperator from "./impls/FindPrevOperator";
-import NavigateHistoryNextOperator from "./impls/NavigateHistoryNextOperator";
-import NavigateHistoryPrevOperator from "./impls/NavigateHistoryPrevOperator";
-import NavigateLinkNextOperator from "./impls/NavigateLinkNextOperator";
-import NavigateLinkPrevOperator from "./impls/NavigateLinkPrevOperator";
-import NavigateParentOperator from "./impls/NavigateParentOperator";
-import NavigateRootOperator from "./impls/NavigateRootOperator";
-import OpenHomeOperator from "./impls/OpenHomeOperator";
-import OpenSourceOperator from "./impls/OpenSourceOperator";
-import PinTabOperator from "./impls/PinTabOperator";
-import ReloadTabOperator from "./impls/ReloadTabOperator";
-import ReopenTabOperator from "./impls/ReopenTabOperator";
-import RepeatLastOperator from "./impls/RepeatLastOperator";
-import SelectFirstTabOperator from "./impls/SelectFirstTabOperator";
-import SelectLastTabOperator from "./impls/SelectLastTabOperator";
-import SelectPreviousSelectedTabOperator from "./impls/SelectPreviousSelectedTabOperator";
-import SelectTabNextOperator from "./impls/SelectTabNextOperator";
-import SelectTabPrevOperator from "./impls/SelectTabPrevOperator";
-import ShowAddBookmarkOperator from "./impls/ShowAddBookmarkOperator";
-import ShowBufferCommandOperator from "./impls/ShowBufferCommandOperator";
-import ShowCommandOperator from "./impls/ShowCommandOperator";
-import ShowOpenCommandOperator from "./impls/ShowOpenCommandOperator";
-import ShowTabOpenCommandOperator from "./impls/ShowTabOpenCommandOperator";
-import ShowWinOpenCommandOperator from "./impls/ShowWinOpenCommandOperator";
-import StartFindOperator from "./impls/StartFindOperator";
-import TogglePinnedTabOperator from "./impls/TogglePinnedTabOperator";
-import ToggleReaderOperator from "./impls/ToggleReaderOperator";
-import UnpinTabOperator from "./impls/UnpinTabOperator";
-import ZoomInOperator from "./impls/ZoomInOperator";
-import ZoomOutOperator from "./impls/ZoomOutOperator";
-import ZoomResetOperator from "./impls/ZoomResetOperator";
-import HorizontalScrollOperator from "./impls/HorizontalScrollOperator";
-import ScrollToBottomOperator from "./impls/ScrollToBottomOperator";
-import ScrollToEndOperator from "./impls/ScrollToEndOperator";
-import ScrollToHomeOperator from "./impls/ScrollToHomeOperator";
-import ScrollToTopOperator from "./impls/ScrollToTopOperator";
-import VerticalScrollOperator from "./impls/VerticalScrollOperator";
-import PageScrollOperator from "./impls/PageScrollOperator";
-import FocusOperator from "./impls/FocusOperator";
-import YankOperator from "./impls/YankOperator";
-import PasteOperator from "./impls/PasteOperator";
-import StartSetMarkOperator from "./impls/StartSetMarkOperator";
-import StartJumpMarkOperator from "./impls/StartJumpMarkOperator";
-import StartFollowOperator from "./impls/StartFollowOperator";
-import QuickHintOperator from "./impls/QuickHintOperator";
-import OpenImageHintOperator from "./impls/OpenImageHintOperator";
-import YankURLHintOperator from "./impls/YankURLHintOperator";
-import YankLinkTextOperator from "./impls/YankLinkTextOperator";
-import OpenHintOperator from "./impls/OpenHintOperator";
-import TabopenHintOperator from "./impls/TabopenHintOperator";
-import WinopenHintOperator from "./impls/WinopenHintOperator";
-import OpenCommandHintOperator from "./impls/OpenCommandHintOperator";
-import TabopenCommandHintOperator from "./impls/TabopenCommandHintOperator";
-import WinopenCommandHintOperator from "./impls/WinopenCommandHintOperator";
-import OpenSourceHintOperator from "./impls/OpenSourceHintOperator";
+import { EnableAddonOperator } from "./impls/EnableAddonOperator";
+import { DisableAddonOperator } from "./impls/DisableAddonOperator";
+import { ToggleAddonOperator } from "./impls/ToggleAddonOperator";
+import { CancelOperator } from "./impls/CancelOperator";
+import { CloseTabOperator } from "./impls/CloseTabOperator";
+import { CloseTabRightOperator } from "./impls/CloseTabRightOperator";
+import { DuplicateTabOperator } from "./impls/DuplicateTabOperator";
+import { FindNextOperator } from "./impls/FindNextOperator";
+import { FindPrevOperator } from "./impls/FindPrevOperator";
+import { NavigateHistoryNextOperator } from "./impls/NavigateHistoryNextOperator";
+import { NavigateHistoryPrevOperator } from "./impls/NavigateHistoryPrevOperator";
+import { NavigateLinkNextOperator } from "./impls/NavigateLinkNextOperator";
+import { NavigateLinkPrevOperator } from "./impls/NavigateLinkPrevOperator";
+import { NavigateParentOperator } from "./impls/NavigateParentOperator";
+import { NavigateRootOperator } from "./impls/NavigateRootOperator";
+import { OpenHomeOperator } from "./impls/OpenHomeOperator";
+import { OpenSourceOperator } from "./impls/OpenSourceOperator";
+import { PinTabOperator } from "./impls/PinTabOperator";
+import { ReloadTabOperator } from "./impls/ReloadTabOperator";
+import { ReopenTabOperator } from "./impls/ReopenTabOperator";
+import { RepeatLastOperator } from "./impls/RepeatLastOperator";
+import { SelectFirstTabOperator } from "./impls/SelectFirstTabOperator";
+import { SelectLastTabOperator } from "./impls/SelectLastTabOperator";
+import { SelectPreviousSelectedTabOperator } from "./impls/SelectPreviousSelectedTabOperator";
+import { SelectTabNextOperator } from "./impls/SelectTabNextOperator";
+import { SelectTabPrevOperator } from "./impls/SelectTabPrevOperator";
+import { ShowAddBookmarkOperator } from "./impls/ShowAddBookmarkOperator";
+import { ShowBufferCommandOperator } from "./impls/ShowBufferCommandOperator";
+import { ShowCommandOperator } from "./impls/ShowCommandOperator";
+import { ShowOpenCommandOperator } from "./impls/ShowOpenCommandOperator";
+import { ShowTabOpenCommandOperator } from "./impls/ShowTabOpenCommandOperator";
+import { ShowWinOpenCommandOperator } from "./impls/ShowWinOpenCommandOperator";
+import { StartFindOperator } from "./impls/StartFindOperator";
+import { TogglePinnedTabOperator } from "./impls/TogglePinnedTabOperator";
+import { ToggleReaderOperator } from "./impls/ToggleReaderOperator";
+import { UnpinTabOperator } from "./impls/UnpinTabOperator";
+import { ZoomInOperator } from "./impls/ZoomInOperator";
+import { ZoomOutOperator } from "./impls/ZoomOutOperator";
+import { ZoomResetOperator } from "./impls/ZoomResetOperator";
+import { HorizontalScrollOperator } from "./impls/HorizontalScrollOperator";
+import { ScrollToBottomOperator } from "./impls/ScrollToBottomOperator";
+import { ScrollToEndOperator } from "./impls/ScrollToEndOperator";
+import { ScrollToHomeOperator } from "./impls/ScrollToHomeOperator";
+import { ScrollToTopOperator } from "./impls/ScrollToTopOperator";
+import { VerticalScrollOperator } from "./impls/VerticalScrollOperator";
+import { PageScrollOperator } from "./impls/PageScrollOperator";
+import { FocusOperator } from "./impls/FocusOperator";
+import { YankOperator } from "./impls/YankOperator";
+import { PasteOperator } from "./impls/PasteOperator";
+import { StartSetMarkOperator } from "./impls/StartSetMarkOperator";
+import { StartJumpMarkOperator } from "./impls/StartJumpMarkOperator";
+import { StartFollowOperator } from "./impls/StartFollowOperator";
+import { QuickHintOperator } from "./impls/QuickHintOperator";
+import { OpenImageHintOperator } from "./impls/OpenImageHintOperator";
+import { YankURLHintOperator } from "./impls/YankURLHintOperator";
+import { YankLinkTextOperator } from "./impls/YankLinkTextOperator";
+import { OpenHintOperator } from "./impls/OpenHintOperator";
+import { TabopenHintOperator } from "./impls/TabopenHintOperator";
+import { WinopenHintOperator } from "./impls/WinopenHintOperator";
+import { OpenCommandHintOperator } from "./impls/OpenCommandHintOperator";
+import { TabopenCommandHintOperator } from "./impls/TabopenCommandHintOperator";
+import { WinopenCommandHintOperator } from "./impls/WinopenCommandHintOperator";
+import { OpenSourceHintOperator } from "./impls/OpenSourceHintOperator";
import type { RepeatRepository } from "../repositories/RepeatRepository";
import { OperatorRegistryImpl } from "./OperatorRegistory";
diff --git a/src/background/property/ColorSchemeProperty.ts b/src/background/property/ColorSchemeProperty.ts
index 0b0dd3b4..5331ae31 100644
--- a/src/background/property/ColorSchemeProperty.ts
+++ b/src/background/property/ColorSchemeProperty.ts
@@ -6,7 +6,7 @@ enum ColorScheme {
Dark = "dark",
}
-export default class ColorSchemeProperty implements Property {
+export class ColorSchemeProperty implements Property {
name() {
return "colorscheme";
}
diff --git a/src/background/property/CompleteProperty.ts b/src/background/property/CompleteProperty.ts
index cdb09bc4..571d7aaa 100644
--- a/src/background/property/CompleteProperty.ts
+++ b/src/background/property/CompleteProperty.ts
@@ -6,7 +6,7 @@ enum Complete {
History = "h",
}
-export default class CompleteProperty implements Property {
+export class CompleteProperty implements Property {
name() {
return "complete";
}
diff --git a/src/background/property/FindModeProperty.ts b/src/background/property/FindModeProperty.ts
index 1671cf7c..a5488a2d 100644
--- a/src/background/property/FindModeProperty.ts
+++ b/src/background/property/FindModeProperty.ts
@@ -5,7 +5,7 @@ enum FindMode {
RegExp = "regexp",
}
-export default class FindModeProperty implements Property {
+export class FindModeProperty implements Property {
name() {
return "findmode";
}
diff --git a/src/background/property/HintcharsProperty.ts b/src/background/property/HintcharsProperty.ts
index fadb43a7..87efa542 100644
--- a/src/background/property/HintcharsProperty.ts
+++ b/src/background/property/HintcharsProperty.ts
@@ -1,6 +1,6 @@
import type { Property, PropertyType } from "./types";
-export default class HintcharsProperty implements Property {
+export class HintcharsProperty implements Property {
name() {
return "hintchars";
}
diff --git a/src/background/property/IgnoreCaseProperty.ts b/src/background/property/IgnoreCaseProperty.ts
index d3e904a5..19274ff3 100644
--- a/src/background/property/IgnoreCaseProperty.ts
+++ b/src/background/property/IgnoreCaseProperty.ts
@@ -1,6 +1,6 @@
import type { Property, PropertyType } from "./types";
-export default class IgnoreCaseProperty implements Property {
+export class IgnoreCaseProperty implements Property {
name() {
return "ignorecase";
}
diff --git a/src/background/property/SmoothScrollProperty.ts b/src/background/property/SmoothScrollProperty.ts
index 04dc49bb..d5014dd1 100644
--- a/src/background/property/SmoothScrollProperty.ts
+++ b/src/background/property/SmoothScrollProperty.ts
@@ -1,6 +1,6 @@
import type { Property, PropertyType } from "./types";
-export default class SmoothScrollProperty implements Property {
+export class SmoothScrollProperty implements Property {
name() {
return "smoothscroll";
}
diff --git a/src/background/property/index.ts b/src/background/property/index.ts
index bf8c29ba..0bb5ee3a 100644
--- a/src/background/property/index.ts
+++ b/src/background/property/index.ts
@@ -1,9 +1,9 @@
-import ColorSchemeProperty from "./ColorSchemeProperty";
-import CompleteProperty from "./CompleteProperty";
-import HintcharsProperty from "./HintcharsProperty";
-import SmoothScrollProperty from "./SmoothScrollProperty";
-import IgnoreCaseProperty from "./IgnoreCaseProperty";
-import FindModeProperty from "./FindModeProperty";
+import { ColorSchemeProperty } from "./ColorSchemeProperty";
+import { CompleteProperty } from "./CompleteProperty";
+import { HintcharsProperty } from "./HintcharsProperty";
+import { SmoothScrollProperty } from "./SmoothScrollProperty";
+import { IgnoreCaseProperty } from "./IgnoreCaseProperty";
+import { FindModeProperty } from "./FindModeProperty";
import {
type PropertyRegistry,
PropertyRegistryImpl,
diff --git a/src/background/repositories/BookmarkRepository.ts b/src/background/repositories/BookmarkRepository.ts
deleted file mode 100644
index b3c33992..00000000
--- a/src/background/repositories/BookmarkRepository.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { injectable } from "inversify";
-
-@injectable()
-export default class BookmarkRepository {
- async create(
- title: string,
- url: string,
- ): Promise {
- const item = await chrome.bookmarks.create({ title, url });
- return item;
- }
-}
diff --git a/src/background/settings/Validator.ts b/src/background/settings/Validator.ts
index 07eec3bd..240365da 100644
--- a/src/background/settings/Validator.ts
+++ b/src/background/settings/Validator.ts
@@ -4,7 +4,7 @@ import type { PropertyRegistry } from "../property/PropertyRegistry";
import type { OperatorRegistory } from "../operators/OperatorRegistory";
@injectable()
-export default class Validator {
+export class Validator {
constructor(
@inject("PropertyRegistry")
private readonly propertyRegistry: PropertyRegistry,
diff --git a/src/background/usecases/AddonEnabledEventUseCase.ts b/src/background/usecases/AddonEnabledEventUseCase.ts
index 88e44851..79895206 100644
--- a/src/background/usecases/AddonEnabledEventUseCase.ts
+++ b/src/background/usecases/AddonEnabledEventUseCase.ts
@@ -1,12 +1,12 @@
import { inject, injectable } from "inversify";
import type { ToolbarPresenter } from "../presenters/ToolbarPresenter";
-import AddonEnabledUseCase from "./AddonEnabledUseCase";
+import { AddonEnabledUseCase } from "./AddonEnabledUseCase";
import type { AddonEnabledRepository } from "../repositories/AddonEnabledRepository";
import type { AddonEnabledClient } from "../clients/AddonEnabledClient";
-import EventUseCaseHelper from "./EventUseCaseHelper";
+import { EventUseCaseHelper } from "./EventUseCaseHelper";
@injectable()
-export default class AddonEnabledEventUseCase {
+export class AddonEnabledEventUseCase {
constructor(
@inject("ToolbarPresenter")
private readonly toolbarPresenter: ToolbarPresenter,
diff --git a/src/background/usecases/AddonEnabledUseCase.ts b/src/background/usecases/AddonEnabledUseCase.ts
index 59b2dc74..b540f13d 100644
--- a/src/background/usecases/AddonEnabledUseCase.ts
+++ b/src/background/usecases/AddonEnabledUseCase.ts
@@ -3,7 +3,7 @@ import type { ToolbarPresenter } from "../presenters/ToolbarPresenter";
import type { AddonEnabledRepository } from "../repositories/AddonEnabledRepository";
@injectable()
-export default class AddonEnabledUseCase {
+export class AddonEnabledUseCase {
constructor(
@inject("ToolbarPresenter")
private readonly toolbarPresenter: ToolbarPresenter,
diff --git a/src/background/usecases/CommandUseCase.ts b/src/background/usecases/CommandUseCase.ts
index ea8f55ec..47208299 100644
--- a/src/background/usecases/CommandUseCase.ts
+++ b/src/background/usecases/CommandUseCase.ts
@@ -6,7 +6,7 @@ import type { CommandContext } from "../command/types";
import { parseCommand, onCommandInputting } from "./parser";
@injectable()
-export default class CommandUseCase {
+export class CommandUseCase {
constructor(
@inject("CommandRegistry")
private readonly commandRegistry: CommandRegistry,
diff --git a/src/background/usecases/ConsoleUseCase.ts b/src/background/usecases/ConsoleUseCase.ts
index ca5ff866..821917df 100644
--- a/src/background/usecases/ConsoleUseCase.ts
+++ b/src/background/usecases/ConsoleUseCase.ts
@@ -2,7 +2,7 @@ import { inject, injectable } from "inversify";
import type { ConsoleFrameClient } from "../clients/ConsoleFrameClient";
@injectable()
-export default class ConsoleUseCase {
+export class ConsoleUseCase {
constructor(
@inject("ConsoleFrameClient")
private readonly consoleFrameClient: ConsoleFrameClient,
diff --git a/src/background/usecases/EventUseCaseHelper.ts b/src/background/usecases/EventUseCaseHelper.ts
index 36600be4..7f92931c 100644
--- a/src/background/usecases/EventUseCaseHelper.ts
+++ b/src/background/usecases/EventUseCaseHelper.ts
@@ -1,7 +1,7 @@
import { injectable } from "inversify";
@injectable()
-export default class EventUseCaseHelper {
+export class EventUseCaseHelper {
async isSystemTab(tabId: number): Promise {
const tab = await chrome.tabs.get(tabId);
if (
diff --git a/src/background/usecases/FindUseCase.ts b/src/background/usecases/FindUseCase.ts
index a69e4f21..c07eb358 100644
--- a/src/background/usecases/FindUseCase.ts
+++ b/src/background/usecases/FindUseCase.ts
@@ -7,7 +7,7 @@ import type { FindClient } from "../clients/FindClient";
import type { ReadyFrameRepository } from "../repositories/ReadyFrameRepository";
@injectable()
-export default class FindUseCase {
+export class FindUseCase {
constructor(
@inject("FindClient")
private readonly findClient: FindClient,
diff --git a/src/background/usecases/HintKeyUseCase.ts b/src/background/usecases/HintKeyUseCase.ts
index ba876a0d..d634cab1 100644
--- a/src/background/usecases/HintKeyUseCase.ts
+++ b/src/background/usecases/HintKeyUseCase.ts
@@ -5,7 +5,7 @@ import type { HintRepository } from "../repositories/HintRepository";
import type { HintActionFactory } from "../hint/HintActionFactory";
@injectable()
-export default class HintKeyUseCase {
+export class HintKeyUseCase {
constructor(
@inject("HintClient")
private readonly hintClient: HintClient,
diff --git a/src/background/usecases/HintModeUseCase.ts b/src/background/usecases/HintModeUseCase.ts
index b62b1577..52622fe1 100644
--- a/src/background/usecases/HintModeUseCase.ts
+++ b/src/background/usecases/HintModeUseCase.ts
@@ -6,10 +6,10 @@ import type { HintTarget } from "../hint/types";
import type { HintClient } from "../clients/HintClient";
import type { HintRepository } from "../repositories/HintRepository";
import type { HintActionFactory } from "../hint/HintActionFactory";
-import HintTagProducer from "./HintTagProducer";
+import { HintTagProducer } from "./HintTagProducer";
@injectable()
-export default class HintModeUseCaes {
+export class HintModeUseCase {
constructor(
@inject("TopFrameClient")
private readonly topFrameClient: TopFrameClient,
diff --git a/src/background/usecases/HintTagProducer.ts b/src/background/usecases/HintTagProducer.ts
index 0d1b569b..cd1fd5a7 100644
--- a/src/background/usecases/HintTagProducer.ts
+++ b/src/background/usecases/HintTagProducer.ts
@@ -1,4 +1,4 @@
-export default class HintTagProducer {
+export class HintTagProducer {
private counter: number[] = [];
constructor(private readonly charset: string) {}
diff --git a/src/background/usecases/MarkHelper.ts b/src/background/usecases/MarkHelper.ts
index 5fd98921..024a57d5 100644
--- a/src/background/usecases/MarkHelper.ts
+++ b/src/background/usecases/MarkHelper.ts
@@ -1,7 +1,7 @@
import { injectable } from "inversify";
@injectable()
-export default class MarkHelper {
+export class MarkHelper {
isGlobalKey(key: string): boolean {
return /^[A-Z0-9]$/.test(key);
}
diff --git a/src/background/usecases/MarkJumpUseCase.ts b/src/background/usecases/MarkJumpUseCase.ts
index 6eaf8fb8..94b604c8 100644
--- a/src/background/usecases/MarkJumpUseCase.ts
+++ b/src/background/usecases/MarkJumpUseCase.ts
@@ -3,10 +3,10 @@ import type { MarkRepository } from "../repositories/MarkRepository";
import type { ContentMessageClient } from "../clients/ContentMessageClient";
import type { ConsoleClient } from "../clients/ConsoleClient";
import type { PropertySettings } from "../settings/PropertySettings";
-import MarkHelper from "./MarkHelper";
+import { MarkHelper } from "./MarkHelper";
@injectable()
-export default class MarkJumpUseCase {
+export class MarkJumpUseCase {
constructor(
@inject("MarkRepository")
private readonly markRepository: MarkRepository,
diff --git a/src/background/usecases/MarkSetUseCase.ts b/src/background/usecases/MarkSetUseCase.ts
index 4f567639..361cd184 100644
--- a/src/background/usecases/MarkSetUseCase.ts
+++ b/src/background/usecases/MarkSetUseCase.ts
@@ -6,10 +6,10 @@ import type {
} from "../repositories/MarkRepository";
import type { ContentMessageClient } from "../clients/ContentMessageClient";
import type { ConsoleClient } from "../clients/ConsoleClient";
-import MarkHelper from "./MarkHelper";
+import { MarkHelper } from "./MarkHelper";
@injectable()
-export default class MarkSetUseCase {
+export class MarkSetUseCase {
constructor(
@inject("MarkRepository")
private readonly markRepository: MarkRepository,
diff --git a/src/background/usecases/ModeUseCase.ts b/src/background/usecases/ModeUseCase.ts
index d5dfa4c1..85fb1774 100644
--- a/src/background/usecases/ModeUseCase.ts
+++ b/src/background/usecases/ModeUseCase.ts
@@ -4,7 +4,7 @@ import type { ModeClient } from "../clients/ModeClient";
import type { ModeRepository } from "../repositories/ModeRepository";
@injectable()
-export default class ModeUseCase {
+export class ModeUseCase {
constructor(
@inject("ModeRepository")
private readonly modeRepository: ModeRepository,
diff --git a/src/background/usecases/OperationUseCase.ts b/src/background/usecases/OperationUseCase.ts
index 651bb2b5..e9618933 100644
--- a/src/background/usecases/OperationUseCase.ts
+++ b/src/background/usecases/OperationUseCase.ts
@@ -6,7 +6,7 @@ import type { RepeatRepository } from "../repositories/RepeatRepository";
import type { RequestContext } from "../messaging/types";
@injectable()
-export default class OperationUseCase {
+export class OperationUseCase {
constructor(
@inject("OperatorRegistory")
private readonly operatorRegistory: OperatorRegistory,
diff --git a/src/background/usecases/SettingsEventUseCase.ts b/src/background/usecases/SettingsEventUseCase.ts
index 32e66f20..b13a1ac4 100644
--- a/src/background/usecases/SettingsEventUseCase.ts
+++ b/src/background/usecases/SettingsEventUseCase.ts
@@ -1,10 +1,10 @@
import { injectable, inject } from "inversify";
import type { ContentMessageClient } from "../clients/ContentMessageClient";
import type { SettingsRepository } from "../settings/SettingsRepository";
-import EventUseCaseHelper from "./EventUseCaseHelper";
+import { EventUseCaseHelper } from "./EventUseCaseHelper";
@injectable()
-export default class SettingsUseCase {
+export class SettingsEventUseCase {
constructor(
@inject("PermanentSettingsRepository")
private readonly settingsRepository: SettingsRepository,
diff --git a/src/background/usecases/SettingsUseCase.ts b/src/background/usecases/SettingsUseCase.ts
index 96184979..4dc33eb8 100644
--- a/src/background/usecases/SettingsUseCase.ts
+++ b/src/background/usecases/SettingsUseCase.ts
@@ -3,10 +3,10 @@ import { serialize, deserialize } from "../../settings";
import type { SettingsRepository } from "../settings/SettingsRepository";
import type { PropertySettings } from "../settings/PropertySettings";
import type { StyleSettings } from "../settings/StyleSettings";
-import Validator from "../settings/Validator";
+import { Validator } from "../settings/Validator";
@injectable()
-export default class SettingsUseCase {
+export class SettingsUseCase {
constructor(
@inject("SettingsRepository")
private readonly settingsRepository: SettingsRepository,
diff --git a/src/background/usecases/VersionUseCase.ts b/src/background/usecases/VersionUseCase.ts
index 9f8fe0a6..048815b3 100644
--- a/src/background/usecases/VersionUseCase.ts
+++ b/src/background/usecases/VersionUseCase.ts
@@ -2,7 +2,7 @@ import { injectable, inject } from "inversify";
import type { Notifier } from "../presenters/Notifier";
@injectable()
-export default class VersionUseCase {
+export class VersionUseCase {
constructor(@inject("Notifier") private notifier: Notifier) {}
notify(): Promise {
diff --git a/src/console/App.tsx b/src/console/App.tsx
index 15c8ac0a..b3fb7584 100644
--- a/src/console/App.tsx
+++ b/src/console/App.tsx
@@ -1,9 +1,9 @@
import React from "react";
-import Prompt from "./components/Prompt";
-import InfoMessage from "./components/InfoMessage";
-import ErrorMessage from "./components/ErrorMessage";
+import { Prompt } from "./components/Prompt";
+import { InfoMessage } from "./components/InfoMessage";
+import { ErrorMessage } from "./components/ErrorMessage";
import { SimplexReceiver } from "../messaging";
-import StyleProvider from "./styles/providers";
+import { StyleProvider } from "./styles/providers";
import type { Schema as ConsoleMessageSchema } from "../messaging/schema/console";
import {
useConsoleMode,
@@ -19,7 +19,7 @@ import {
const COMMAND_COMPLETION_MAX_ITEMS = 33;
const FIND_COMPLETION_MAX_ITEMS = 11;
-const App: React.FC = () => {
+export const App: React.FC = () => {
const { hide, visible } = useVisibility();
const {
state,
@@ -105,5 +105,3 @@ const App: React.FC = () => {
return {content};
};
-
-export default App;
diff --git a/src/console/app/hooks.ts b/src/console/app/hooks.ts
index 0f03ff32..99f969bc 100644
--- a/src/console/app/hooks.ts
+++ b/src/console/app/hooks.ts
@@ -1,8 +1,8 @@
import React from "react";
import * as actions from "./actions";
import { AppDispatchContext, AppStateContext } from "./contexts";
-import CommandClient from "../clients/CommandClient";
-import FindClient from "../clients/FindClient";
+import { CommandClient } from "../clients/CommandClient";
+import { FindClient } from "../clients/FindClient";
import { newSender } from "../clients/BackgroundMessageSender";
import { SimplexSender } from "../../messaging";
import type {
diff --git a/src/console/app/provider.tsx b/src/console/app/provider.tsx
index 7bc033ef..4cbd9ef2 100644
--- a/src/console/app/provider.tsx
+++ b/src/console/app/provider.tsx
@@ -1,5 +1,5 @@
import React from "react";
-import reducer, { defaultState } from "./recuer";
+import { reducer, defaultState } from "./recuer";
import { AppDispatchContext, AppStateContext } from "./contexts";
type Props = {
diff --git a/src/console/app/recuer.ts b/src/console/app/recuer.ts
index beeb0b06..694d836d 100644
--- a/src/console/app/recuer.ts
+++ b/src/console/app/recuer.ts
@@ -16,11 +16,7 @@ export type State =
export const defaultState: State = { mode: undefined };
-// eslint-disable-next-line max-lines-per-function
-export default function reducer(
- state: State = defaultState,
- action: AppAction,
-): State {
+export function reducer(state: State = defaultState, action: AppAction): State {
switch (action.type) {
case HIDE:
return { mode: undefined };
diff --git a/src/console/clients/CommandClient.ts b/src/console/clients/CommandClient.ts
index 2960ae87..489e58ec 100644
--- a/src/console/clients/CommandClient.ts
+++ b/src/console/clients/CommandClient.ts
@@ -1,7 +1,7 @@
import type { BackgroundMessageSender } from "./BackgroundMessageSender";
import type { Completions } from "../../shared/completions";
-export default class CommandClient {
+export class CommandClient {
constructor(private readonly sender: BackgroundMessageSender) {}
async execCommand(text: string): Promise {
diff --git a/src/console/clients/ConsoleFrameClient.ts b/src/console/clients/ConsoleFrameClient.ts
index b80e2377..43b9c7dc 100644
--- a/src/console/clients/ConsoleFrameClient.ts
+++ b/src/console/clients/ConsoleFrameClient.ts
@@ -1,6 +1,6 @@
import type { BackgroundMessageSender } from "./BackgroundMessageSender";
-export default class ConsoleFrameClient {
+export class ConsoleFrameClient {
constructor(private readonly sender: BackgroundMessageSender) {}
async resize(width: number, height: number): Promise {
diff --git a/src/console/clients/FindClient.ts b/src/console/clients/FindClient.ts
index a0fc7e93..e0235fe2 100644
--- a/src/console/clients/FindClient.ts
+++ b/src/console/clients/FindClient.ts
@@ -1,7 +1,7 @@
import type { BackgroundMessageSender } from "./BackgroundMessageSender";
import type { Completions } from "../../shared/completions";
-export default class FindClient {
+export class FindClient {
constructor(private readonly sender: BackgroundMessageSender) {}
async execFind(text?: string): Promise {
diff --git a/src/console/clients/SettingClient.ts b/src/console/clients/SettingClient.ts
index 1b6fd7ce..227edccb 100644
--- a/src/console/clients/SettingClient.ts
+++ b/src/console/clients/SettingClient.ts
@@ -1,6 +1,6 @@
import type { BackgroundMessageSender } from "./BackgroundMessageSender";
-export default class SettingClient {
+export class SettingClient {
constructor(private readonly sender: BackgroundMessageSender) {}
async getColorScheme(): Promise {
diff --git a/src/console/completion/components/Completion.tsx b/src/console/completion/components/Completion.tsx
index ad97e75f..a20dac7b 100644
--- a/src/console/completion/components/Completion.tsx
+++ b/src/console/completion/components/Completion.tsx
@@ -1,9 +1,9 @@
import React from "react";
import stylex from "@stylexjs/stylex";
import type { Completions } from "../../../shared/completions";
-import useCompletionKeyBinds from "../hooks/useCompletionKeyBinds";
-import useCursor from "../hooks/useCursor";
-import CompletionList from "./CompletionList";
+import { useCompletionKeyBinds } from "../hooks/useCompletionKeyBinds";
+import { useCursor } from "../hooks/useCursor";
+import { CompletionList } from "./CompletionList";
type InputProps = React.DetailedHTMLProps<
React.InputHTMLAttributes,
@@ -58,7 +58,7 @@ const useFlatten = (completions: Completions) => {
);
};
-const Completion: React.FC = ({
+export const Completion: React.FC = ({
defaultValue,
renderInput,
completions,
@@ -139,5 +139,3 @@ const Completion: React.FC = ({
);
};
-
-export default Completion;
diff --git a/src/console/completion/components/CompletionItem.tsx b/src/console/completion/components/CompletionItem.tsx
index d57d9da7..02f2ce72 100644
--- a/src/console/completion/components/CompletionItem.tsx
+++ b/src/console/completion/components/CompletionItem.tsx
@@ -49,7 +49,7 @@ interface Props extends React.HTMLAttributes {
icon?: string;
}
-const CompletionItem: React.FC = ({
+export const CompletionItem: React.FC = ({
shown,
highlight,
primary,
@@ -76,5 +76,3 @@ const CompletionItem: React.FC = ({
{secondary}
);
-
-export default CompletionItem;
diff --git a/src/console/completion/components/CompletionList.tsx b/src/console/completion/components/CompletionList.tsx
index 287278e8..c523fffc 100644
--- a/src/console/completion/components/CompletionList.tsx
+++ b/src/console/completion/components/CompletionList.tsx
@@ -1,6 +1,6 @@
import React from "react";
-import CompletionItem from "./CompletionItem";
-import CompletionTitle from "./CompletionTitle";
+import { CompletionItem } from "./CompletionItem";
+import { CompletionTitle } from "./CompletionTitle";
interface Item {
icon?: string;
@@ -19,7 +19,7 @@ interface Props {
completions: Group[];
}
-const Completion: React.FC = ({ select, size, completions }) => {
+export const CompletionList: React.FC = ({ select, size, completions }) => {
const [viewOffset, setViewOffset] = React.useState(0);
const [prevSelect, setPrevSelect] = React.useState(-1);
@@ -103,5 +103,3 @@ const Completion: React.FC = ({ select, size, completions }) => {
return {groups}
;
};
-
-export default Completion;
diff --git a/src/console/completion/components/CompletionTitle.tsx b/src/console/completion/components/CompletionTitle.tsx
index 9b507b4b..41179305 100644
--- a/src/console/completion/components/CompletionTitle.tsx
+++ b/src/console/completion/components/CompletionTitle.tsx
@@ -24,7 +24,11 @@ interface Props extends React.HTMLAttributes {
title: string;
}
-const CompletionTitle: React.FC = ({ shown, title, ...props }) => (
+export const CompletionTitle: React.FC = ({
+ shown,
+ title,
+ ...props
+}) => (
= ({ shown, title, ...props }) => (
{title}
);
-
-export default CompletionTitle;
diff --git a/src/console/completion/hooks/useCompletionKeyBinds.ts b/src/console/completion/hooks/useCompletionKeyBinds.ts
index 5b007c5d..1ace09f9 100644
--- a/src/console/completion/hooks/useCompletionKeyBinds.ts
+++ b/src/console/completion/hooks/useCompletionKeyBinds.ts
@@ -8,7 +8,7 @@ type Props = {
onCancel: EventFn;
};
-const useCompletionKeyBinds = ({
+export const useCompletionKeyBinds = ({
onEnter,
onNext,
onPrev,
@@ -59,5 +59,3 @@ const useCompletionKeyBinds = ({
return onKeyDown;
};
-
-export default useCompletionKeyBinds;
diff --git a/src/console/completion/hooks/useCursor.ts b/src/console/completion/hooks/useCursor.ts
index 9612124b..eef0a5f4 100644
--- a/src/console/completion/hooks/useCursor.ts
+++ b/src/console/completion/hooks/useCursor.ts
@@ -1,5 +1,6 @@
import React from "react";
-const useCursor = (itemCount: number, initCursor = -1) => {
+
+export const useCursor = (itemCount: number, initCursor = -1) => {
if (itemCount < 0) {
throw new TypeError("item count must be greater than or equal to 0");
}
@@ -41,5 +42,3 @@ const useCursor = (itemCount: number, initCursor = -1) => {
reset,
};
};
-
-export default useCursor;
diff --git a/src/console/completion/index.tsx b/src/console/completion/index.tsx
deleted file mode 100644
index c500fa3e..00000000
--- a/src/console/completion/index.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-import Completion from "./components/Completion";
-
-export default Completion;
diff --git a/src/console/components/ErrorMessage.tsx b/src/console/components/ErrorMessage.tsx
index 868a1bb2..fe872402 100644
--- a/src/console/components/ErrorMessage.tsx
+++ b/src/console/components/ErrorMessage.tsx
@@ -1,6 +1,6 @@
import React from "react";
-import useAutoResize from "../hooks/useAutoResize";
import stylex from "@stylexjs/stylex";
+import { useAutoResize } from "../hooks/useAutoResize";
import { colors } from "../styles/tokens.stylex";
const styles = stylex.create({
@@ -16,7 +16,7 @@ type Props = {
children: React.ReactNode;
};
-const ErrorMessage: React.FC = ({ children }) => {
+export const ErrorMessage: React.FC = ({ children }) => {
useAutoResize();
return (
@@ -25,5 +25,3 @@ const ErrorMessage: React.FC = ({ children }) => {
);
};
-
-export default ErrorMessage;
diff --git a/src/console/components/InfoMessage.tsx b/src/console/components/InfoMessage.tsx
index fd4b8b95..f4c82129 100644
--- a/src/console/components/InfoMessage.tsx
+++ b/src/console/components/InfoMessage.tsx
@@ -1,6 +1,6 @@
import React from "react";
-import useAutoResize from "../hooks/useAutoResize";
import stylex from "@stylexjs/stylex";
+import { useAutoResize } from "../hooks/useAutoResize";
import { colors } from "../styles/tokens.stylex";
const styles = stylex.create({
@@ -17,7 +17,7 @@ type Props = {
children: React.ReactNode;
};
-const InfoMessage: React.FC = ({ children }) => {
+export const InfoMessage: React.FC = ({ children }) => {
useAutoResize();
return (
@@ -26,5 +26,3 @@ const InfoMessage: React.FC = ({ children }) => {
);
};
-
-export default InfoMessage;
diff --git a/src/console/components/Prompt.tsx b/src/console/components/Prompt.tsx
index c93b64c4..ecdfdf73 100644
--- a/src/console/components/Prompt.tsx
+++ b/src/console/components/Prompt.tsx
@@ -1,9 +1,9 @@
import React, { type InputHTMLAttributes } from "react";
-import Completion from "../completion";
+import { Completion } from "../completion/components/Completion";
import type { Completions as CompletionsType } from "../../shared/completions";
-import PromptInput from "./PromptInput";
-import useDebounce from "../hooks/useDebounce";
-import useAutoResize from "../hooks/useAutoResize";
+import { PromptInput } from "./PromptInput";
+import { useDebounce } from "../hooks/useDebounce";
+import { useAutoResize } from "../hooks/useAutoResize";
interface Props extends InputHTMLAttributes {
initValue: string;
@@ -13,7 +13,7 @@ interface Props extends InputHTMLAttributes {
queryCompletions?: (query: string) => Promise;
}
-const Prompt: React.FC = ({
+export const Prompt: React.FC = ({
initValue,
prefix,
maxLineHeight,
@@ -61,5 +61,3 @@ const Prompt: React.FC = ({
/>
);
};
-
-export default Prompt;
diff --git a/src/console/components/PromptInput.tsx b/src/console/components/PromptInput.tsx
index c72ac928..7ab28bb6 100644
--- a/src/console/components/PromptInput.tsx
+++ b/src/console/components/PromptInput.tsx
@@ -29,21 +29,18 @@ interface Props extends InputHTMLAttributes {
prefix: string;
}
-const PromptInput: React.FC = React.forwardRef(function PromptInput(
- props,
- ref: React.Ref,
-) {
- const { css } = useUserPreferenceCSS();
- return (
-
- {props.prefix}
-
-
- );
-});
-
-export default PromptInput;
+export const PromptInput: React.FC = React.forwardRef(
+ function PromptInput(props, ref: React.Ref) {
+ const { css } = useUserPreferenceCSS();
+ return (
+
+ {props.prefix}
+
+
+ );
+ },
+);
diff --git a/src/console/hooks/useAutoResize.ts b/src/console/hooks/useAutoResize.ts
index cebf25ee..0aa293e4 100644
--- a/src/console/hooks/useAutoResize.ts
+++ b/src/console/hooks/useAutoResize.ts
@@ -1,10 +1,10 @@
import React from "react";
-import ConsoleFrameClient from "../clients/ConsoleFrameClient";
+import { ConsoleFrameClient } from "../clients/ConsoleFrameClient";
import { newSender } from "../clients/BackgroundMessageSender";
const consoleFrameClient = new ConsoleFrameClient(newSender());
-const useAutoResize = () => {
+export const useAutoResize = () => {
const [prevWidth, setPrevWidth] = React.useState(-1);
const [prevHeight, setPrevHeight] = React.useState(-1);
@@ -23,5 +23,3 @@ const useAutoResize = () => {
setPrevHeight(height);
});
};
-
-export default useAutoResize;
diff --git a/src/console/hooks/useDebounce.ts b/src/console/hooks/useDebounce.ts
index 68c594d9..060aa4b6 100644
--- a/src/console/hooks/useDebounce.ts
+++ b/src/console/hooks/useDebounce.ts
@@ -1,6 +1,6 @@
import React from "react";
-const useDebounce = (value: T, delay: number) => {
+export const useDebounce = (value: T, delay: number) => {
const [debouncedValue, setDebouncedValue] = React.useState(value);
React.useEffect(() => {
@@ -15,5 +15,3 @@ const useDebounce = (value: T, delay: number) => {
return debouncedValue;
};
-
-export default useDebounce;
diff --git a/src/console/index.tsx b/src/console/index.tsx
index 3af4af98..24abd9c6 100644
--- a/src/console/index.tsx
+++ b/src/console/index.tsx
@@ -1,7 +1,7 @@
import React from "react";
import { createRoot } from "react-dom/client";
import { AppProvider } from "./app/provider";
-import App from "./App";
+import { App } from "./App";
window.addEventListener("DOMContentLoaded", () => {
const wrapper = document.getElementById("vimmatic-console");
diff --git a/src/console/styles/colorScheme.tsx b/src/console/styles/colorScheme.tsx
index 2fd0fab4..34df7e08 100644
--- a/src/console/styles/colorScheme.tsx
+++ b/src/console/styles/colorScheme.tsx
@@ -1,6 +1,6 @@
import React from "react";
import stylex from "@stylexjs/stylex";
-import SettingClient from "../clients/SettingClient";
+import { SettingClient } from "../clients/SettingClient";
import { newSender } from "../clients/BackgroundMessageSender";
import { lightTheme, darkTheme } from "./themes";
diff --git a/src/console/styles/providers.tsx b/src/console/styles/providers.tsx
index 79253113..aed41ef4 100644
--- a/src/console/styles/providers.tsx
+++ b/src/console/styles/providers.tsx
@@ -13,4 +13,3 @@ export const StyleProvider: React.FC = ({ children }) => {
);
};
-export default StyleProvider;
diff --git a/src/console/styles/userPreferenceCSS.tsx b/src/console/styles/userPreferenceCSS.tsx
index 86e2c839..ee848255 100644
--- a/src/console/styles/userPreferenceCSS.tsx
+++ b/src/console/styles/userPreferenceCSS.tsx
@@ -1,6 +1,6 @@
import React from "react";
import stylex from "@stylexjs/stylex";
-import SettingClient from "../clients/SettingClient";
+import { SettingClient } from "../clients/SettingClient";
import { newSender } from "../clients/BackgroundMessageSender";
const settingClient = new SettingClient(newSender());
diff --git a/src/content/Application.ts b/src/content/Application.ts
index 76f76b2c..314774ad 100644
--- a/src/content/Application.ts
+++ b/src/content/Application.ts
@@ -1,13 +1,13 @@
import { injectable, inject } from "inversify";
-import WindowMessageListener from "./messaging/WindowMessageListener";
-import ContentMessageListener from "./messaging/ContentMessageListener";
-import KeyController from "./controllers/KeyController";
-import SettingsController from "./controllers/SettingsController";
-import InputDriver from "./InputDriver";
+import { WindowMessageListener } from "./messaging/WindowMessageListener";
+import { ContentMessageListener } from "./messaging/ContentMessageListener";
+import { KeyController } from "./controllers/KeyController";
+import { SettingsController } from "./controllers/SettingsController";
+import { InputDriver } from "./InputDriver";
import type { ReadyStatusPresenter } from "./presenters/ReadyStatusPresenter";
@injectable()
-export default class Application {
+export class Application {
// eslint-disable-next-line max-params
constructor(
@inject(WindowMessageListener)
diff --git a/src/content/Bootstrap.ts b/src/content/Bootstrap.ts
index 62e1530b..7718bd57 100644
--- a/src/content/Bootstrap.ts
+++ b/src/content/Bootstrap.ts
@@ -1,6 +1,6 @@
type Callback = () => void;
-export default class Bootstrap {
+export class Bootstrap {
constructor() {}
isReady(): boolean {
diff --git a/src/content/InputDriver.ts b/src/content/InputDriver.ts
index ab3f7e8d..edda0749 100644
--- a/src/content/InputDriver.ts
+++ b/src/content/InputDriver.ts
@@ -43,7 +43,7 @@ export const keyFromKeyboardEvent = (e: KeyboardEvent): Key => {
});
};
-export default class InputDriver {
+export class InputDriver {
private pressed: { [key: string]: string } = {};
private onKeyListeners: ((key: Key) => boolean)[] = [];
diff --git a/src/content/controllers/AddonEnabledController.ts b/src/content/controllers/AddonEnabledController.ts
index 8439db41..38a90efc 100644
--- a/src/content/controllers/AddonEnabledController.ts
+++ b/src/content/controllers/AddonEnabledController.ts
@@ -1,8 +1,8 @@
import { injectable, inject } from "inversify";
-import AddonEnabledUseCase from "../usecases/AddonEnabledUseCase";
+import { AddonEnabledUseCase } from "../usecases/AddonEnabledUseCase";
@injectable()
-export default class AddonEnabledController {
+export class AddonEnabledController {
constructor(
@inject(AddonEnabledUseCase)
private readonly addonEnabledUseCase: AddonEnabledUseCase,
diff --git a/src/content/controllers/ConsoleFrameController.ts b/src/content/controllers/ConsoleFrameController.ts
index d0f37bc0..ccc5017e 100644
--- a/src/content/controllers/ConsoleFrameController.ts
+++ b/src/content/controllers/ConsoleFrameController.ts
@@ -1,8 +1,8 @@
import { injectable, inject } from "inversify";
-import ConsoleFrameUseCase from "../usecases/ConsoleFrameUseCase";
+import { ConsoleFrameUseCase } from "../usecases/ConsoleFrameUseCase";
@injectable()
-export default class ConsoleFrameController {
+export class ConsoleFrameController {
constructor(
@inject(ConsoleFrameUseCase)
private readonly consoleFrameUseCase: ConsoleFrameUseCase,
diff --git a/src/content/controllers/FindController.ts b/src/content/controllers/FindController.ts
index 88b0f684..f7cdb5fe 100644
--- a/src/content/controllers/FindController.ts
+++ b/src/content/controllers/FindController.ts
@@ -1,9 +1,9 @@
import { injectable, inject } from "inversify";
-import FindUseCase from "../usecases/FindUseCase";
+import { FindUseCase } from "../usecases/FindUseCase";
import type { FindQuery } from "../../shared/findQuery";
@injectable()
-export default class FindController {
+export class FindController {
constructor(
@inject(FindUseCase)
private readonly findUseCase: FindUseCase,
diff --git a/src/content/controllers/FocusController.ts b/src/content/controllers/FocusController.ts
index bafb6b24..663e447c 100644
--- a/src/content/controllers/FocusController.ts
+++ b/src/content/controllers/FocusController.ts
@@ -2,7 +2,7 @@ import { injectable, inject } from "inversify";
import type { FocusPresenter } from "../presenters/FocusPresenter";
@injectable()
-export default class FocusController {
+export class FocusController {
constructor(
@inject("FocusPresenter")
private readonly focusPresenter: FocusPresenter,
diff --git a/src/content/controllers/FrameController.ts b/src/content/controllers/FrameController.ts
index 49447821..e4e3af56 100644
--- a/src/content/controllers/FrameController.ts
+++ b/src/content/controllers/FrameController.ts
@@ -1,8 +1,8 @@
import { injectable, inject } from "inversify";
-import FrameUseCase from "../usecases/FrameUseCase";
+import { FrameUseCase } from "../usecases/FrameUseCase";
@injectable()
-export default class FrameController {
+export class FrameController {
constructor(
@inject(FrameUseCase)
private readonly frameUseCase: FrameUseCase,
diff --git a/src/content/controllers/HintController.ts b/src/content/controllers/HintController.ts
index 383c4009..d418a703 100644
--- a/src/content/controllers/HintController.ts
+++ b/src/content/controllers/HintController.ts
@@ -1,9 +1,9 @@
import { injectable, inject } from "inversify";
-import HintUseCase from "../usecases/HintUseCase";
+import { HintUseCase } from "../usecases/HintUseCase";
import type { HTMLElementType } from "../../shared/HTMLElementType";
@injectable()
-export default class HintController {
+export class HintController {
constructor(
@inject(HintUseCase)
private readonly hintUseCase: HintUseCase,
diff --git a/src/content/controllers/KeyController.ts b/src/content/controllers/KeyController.ts
index 9c45add0..8784148e 100644
--- a/src/content/controllers/KeyController.ts
+++ b/src/content/controllers/KeyController.ts
@@ -3,11 +3,11 @@ import type { Key } from "../../shared/key";
import { Mode } from "../../shared/mode";
import type { ModeRepository } from "../repositories/ModeRepository";
import type { BackgroundKeyClient } from "../client/BackgroundKeyClient";
-import KeymapUseCase from "../usecases/KeymapUseCase";
-import OperationUseCase from "../usecases/OperationUseCase";
+import { KeymapUseCase } from "../usecases/KeymapUseCase";
+import { OperationUseCase } from "../usecases/OperationUseCase";
@injectable()
-export default class KeyController {
+export class KeyController {
constructor(
@inject("ModeRepository")
private readonly modeRepository: ModeRepository,
diff --git a/src/content/controllers/ModeController.ts b/src/content/controllers/ModeController.ts
index 0f2df33c..a211b3cb 100644
--- a/src/content/controllers/ModeController.ts
+++ b/src/content/controllers/ModeController.ts
@@ -3,7 +3,7 @@ import type { Mode } from "../../shared/mode";
import type { ModeRepository } from "../repositories/ModeRepository";
@injectable()
-export default class ModeController {
+export class ModeController {
constructor(
@inject("ModeRepository")
private readonly modeRepository: ModeRepository,
diff --git a/src/content/controllers/NavigateController.ts b/src/content/controllers/NavigateController.ts
index cf3886ed..e51c230e 100644
--- a/src/content/controllers/NavigateController.ts
+++ b/src/content/controllers/NavigateController.ts
@@ -1,8 +1,8 @@
import { injectable, inject } from "inversify";
-import NavigateUseCase from "../usecases/NavigateUseCase";
+import { NavigateUseCase } from "../usecases/NavigateUseCase";
@injectable()
-export default class NavigateController {
+export class NavigateController {
constructor(
@inject(NavigateUseCase)
private readonly navigateUseCase: NavigateUseCase,
diff --git a/src/content/controllers/ScrollController.ts b/src/content/controllers/ScrollController.ts
index e633f2cd..5e2d04f5 100644
--- a/src/content/controllers/ScrollController.ts
+++ b/src/content/controllers/ScrollController.ts
@@ -2,7 +2,7 @@ import { injectable, inject } from "inversify";
import type { ScrollPresenter } from "../presenters/ScrollPresenter";
@injectable()
-export default class ScrollController {
+export class ScrollController {
constructor(
@inject("ScrollPresenter")
private readonly scrollPresenter: ScrollPresenter,
diff --git a/src/content/controllers/SettingsController.ts b/src/content/controllers/SettingsController.ts
index e17b5231..b70c1a6b 100644
--- a/src/content/controllers/SettingsController.ts
+++ b/src/content/controllers/SettingsController.ts
@@ -1,9 +1,9 @@
import { injectable, inject } from "inversify";
-import AddonEnabledUseCase from "../usecases/AddonEnabledUseCase";
+import { AddonEnabledUseCase } from "../usecases/AddonEnabledUseCase";
import type { SettingRepository } from "../repositories/SettingRepository";
@injectable()
-export default class SettingsController {
+export class SettingsController {
constructor(
@inject(AddonEnabledUseCase)
private readonly addonEnabledUseCase: AddonEnabledUseCase,
diff --git a/src/content/controllers/TopFrameController.ts b/src/content/controllers/TopFrameController.ts
index fdfbc1de..12f44769 100644
--- a/src/content/controllers/TopFrameController.ts
+++ b/src/content/controllers/TopFrameController.ts
@@ -1,9 +1,9 @@
import { injectable, inject } from "inversify";
import type { WindowRequestContext } from "./types";
-import TopFrameUseCase from "../usecases/TopFrameUseCase";
+import { TopFrameUseCase } from "../usecases/TopFrameUseCase";
@injectable()
-export default class TopFrameController {
+export class TopFrameController {
constructor(
@inject(TopFrameUseCase)
private readonly topFrameUseCase: TopFrameUseCase,
diff --git a/src/content/domains/KeySequence.ts b/src/content/domains/KeySequence.ts
index 8397980f..22cdcd4a 100644
--- a/src/content/domains/KeySequence.ts
+++ b/src/content/domains/KeySequence.ts
@@ -1,7 +1,7 @@
import type { Key } from "../../shared/key";
import { fromKeymap } from "../../shared/key";
-export default class KeySequence {
+export class KeySequence {
constructor(public readonly keys: Key[]) {}
push(key: Key): number {
diff --git a/src/content/index.ts b/src/content/index.ts
index 127e6b4b..1bde016d 100644
--- a/src/content/index.ts
+++ b/src/content/index.ts
@@ -1,6 +1,6 @@
import "@abraham/reflection";
-import Application from "./Application";
-import Bootstrap from "./Bootstrap";
+import { Application } from "./Application";
+import { Bootstrap } from "./Bootstrap";
import { container } from "./di";
const initDom = () => {
diff --git a/src/content/messaging/ContentMessageListener.ts b/src/content/messaging/ContentMessageListener.ts
index 26f8ff51..98146682 100644
--- a/src/content/messaging/ContentMessageListener.ts
+++ b/src/content/messaging/ContentMessageListener.ts
@@ -1,20 +1,20 @@
import { injectable, inject } from "inversify";
import { Receiver } from "../../messaging";
import type { Schema } from "../../messaging/schema/content";
-import AddonEnabledController from "../controllers/AddonEnabledController";
-import SettingsController from "../controllers/SettingsController";
-import ConsoleFrameController from "../controllers/ConsoleFrameController";
-import NavigateController from "../controllers/NavigateController";
-import FindController from "../controllers/FindController";
-import ScrollController from "../controllers/ScrollController";
-import FocusController from "../controllers/FocusController";
-import ModeController from "../controllers/ModeController";
-import FrameController from "../controllers/FrameController";
-import TopFrameController from "../controllers/TopFrameController";
-import HintController from "../controllers/HintController";
+import { AddonEnabledController } from "../controllers/AddonEnabledController";
+import { SettingsController } from "../controllers/SettingsController";
+import { ConsoleFrameController } from "../controllers/ConsoleFrameController";
+import { NavigateController } from "../controllers/NavigateController";
+import { FindController } from "../controllers/FindController";
+import { ScrollController } from "../controllers/ScrollController";
+import { FocusController } from "../controllers/FocusController";
+import { ModeController } from "../controllers/ModeController";
+import { FrameController } from "../controllers/FrameController";
+import { TopFrameController } from "../controllers/TopFrameController";
+import { HintController } from "../controllers/HintController";
@injectable()
-export default class ContentMessageListener {
+export class ContentMessageListener {
private readonly receiver: Receiver = new Receiver();
constructor(
diff --git a/src/content/messaging/WindowMessageListener.ts b/src/content/messaging/WindowMessageListener.ts
index e52ecce8..b22f1205 100644
--- a/src/content/messaging/WindowMessageListener.ts
+++ b/src/content/messaging/WindowMessageListener.ts
@@ -1,12 +1,12 @@
import { injectable, inject } from "inversify";
import { SimplexReceiverWithContext } from "../../messaging";
import type { Schema as WindowMessageSchema } from "../../messaging/schema/window";
-import ConsoleFrameController from "../controllers/ConsoleFrameController";
-import TopFrameController from "../controllers/TopFrameController";
+import { ConsoleFrameController } from "../controllers/ConsoleFrameController";
+import { TopFrameController } from "../controllers/TopFrameController";
import type { WindowRequestContext } from "../controllers/types";
@injectable()
-export default class WindowMessageListener {
+export class WindowMessageListener {
private readonly receiver: SimplexReceiverWithContext<
WindowMessageSchema,
WindowRequestContext
diff --git a/src/content/presenters/HTMLElementLocator.ts b/src/content/presenters/HTMLElementLocator.ts
index bd25797f..cd7b6ef8 100644
--- a/src/content/presenters/HTMLElementLocator.ts
+++ b/src/content/presenters/HTMLElementLocator.ts
@@ -2,7 +2,7 @@
* HTMLElementLocator is a class to locate HTMLElements by unique id.
* The id is a stringified index of the element in the document.
*/
-class HTMLElementLocator {
+export class HTMLElementLocator {
// assume that the element stracture does not change
private allElements: Record | undefined;
@@ -31,5 +31,3 @@ class HTMLElementLocator {
return this.allElements;
}
}
-
-export default HTMLElementLocator;
diff --git a/src/content/presenters/Hint.ts b/src/content/presenters/Hint.ts
index 7e00f004..eb6ba8f6 100644
--- a/src/content/presenters/Hint.ts
+++ b/src/content/presenters/Hint.ts
@@ -20,7 +20,7 @@ const hintPosition = (element: Element): Point => {
};
};
-export default class Hint {
+export class Hint {
private readonly hint: HTMLElement;
private readonly id: string;
diff --git a/src/content/presenters/HintPresenter.ts b/src/content/presenters/HintPresenter.ts
index 6975b227..91923e9c 100644
--- a/src/content/presenters/HintPresenter.ts
+++ b/src/content/presenters/HintPresenter.ts
@@ -1,8 +1,8 @@
import { inject, injectable } from "inversify";
import type { SettingRepository } from "../repositories/SettingRepository";
-import Hint from "./Hint";
+import { Hint } from "./Hint";
import * as doms from "../../shared/utils/dom";
-import HTMLElementLocator from "./HTMLElementLocator";
+import { HTMLElementLocator } from "./HTMLElementLocator";
import type { HTMLElementType } from "../../shared/HTMLElementType";
interface Size {
diff --git a/src/content/repositories/KeymapRepository.ts b/src/content/repositories/KeymapRepository.ts
index c047625b..c77f7c88 100644
--- a/src/content/repositories/KeymapRepository.ts
+++ b/src/content/repositories/KeymapRepository.ts
@@ -1,6 +1,6 @@
import { injectable } from "inversify";
import type { Key } from "../../shared/key";
-import KeySequence from "../domains/KeySequence";
+import { KeySequence } from "../domains/KeySequence";
export interface KeymapRepository {
enqueueKey(key: Key): KeySequence;
diff --git a/src/content/usecases/AddonEnabledUseCase.ts b/src/content/usecases/AddonEnabledUseCase.ts
index a2295c5f..8bf0d7fd 100644
--- a/src/content/usecases/AddonEnabledUseCase.ts
+++ b/src/content/usecases/AddonEnabledUseCase.ts
@@ -3,7 +3,7 @@ import type { AddonEnabledRepository } from "../repositories/AddonEnabledReposit
import type { ConsoleFramePresenter } from "../presenters/ConsoleFramePresenter";
@injectable()
-export default class AddonEnabledUseCase {
+export class AddonEnabledUseCase {
constructor(
@inject("AddonEnabledRepository")
private readonly addonEnabledRepository: AddonEnabledRepository,
diff --git a/src/content/usecases/ConsoleFrameUseCase.ts b/src/content/usecases/ConsoleFrameUseCase.ts
index 18fefbbe..2389fff8 100644
--- a/src/content/usecases/ConsoleFrameUseCase.ts
+++ b/src/content/usecases/ConsoleFrameUseCase.ts
@@ -3,7 +3,7 @@ import type { ConsoleFramePresenter } from "../presenters/ConsoleFramePresenter"
import type { ReadyStatusPresenter } from "../presenters/ReadyStatusPresenter";
@injectable()
-export default class ConsoleFrameUseCase {
+export class ConsoleFrameUseCase {
constructor(
@inject("ConsoleFramePresenter")
private readonly consoleFramePresenter: ConsoleFramePresenter,
diff --git a/src/content/usecases/FindUseCase.ts b/src/content/usecases/FindUseCase.ts
index abff0bff..300058b1 100644
--- a/src/content/usecases/FindUseCase.ts
+++ b/src/content/usecases/FindUseCase.ts
@@ -3,7 +3,7 @@ import type { FindPresenter } from "../presenters/FindPresenter";
import type { FindQuery } from "../../shared/findQuery";
@injectable()
-export default class FindUseCase {
+export class FindUseCase {
constructor(
@inject("FindPresenter")
private readonly findPresenter: FindPresenter,
diff --git a/src/content/usecases/FrameUseCase.ts b/src/content/usecases/FrameUseCase.ts
index 8712847c..838a9450 100644
--- a/src/content/usecases/FrameUseCase.ts
+++ b/src/content/usecases/FrameUseCase.ts
@@ -2,7 +2,7 @@ import { injectable, inject } from "inversify";
import type { TopFrameClient } from "../client/TopFrameClient";
@injectable()
-export default class FrameUseCase {
+export class FrameUseCase {
constructor(
@inject("TopFrameClient")
private readonly topFrameClient: TopFrameClient,
diff --git a/src/content/usecases/HintUseCase.ts b/src/content/usecases/HintUseCase.ts
index f3f1fd5f..8e05af41 100644
--- a/src/content/usecases/HintUseCase.ts
+++ b/src/content/usecases/HintUseCase.ts
@@ -3,7 +3,7 @@ import type { HintPresenter } from "../presenters/HintPresenter";
import type { HTMLElementType } from "../../shared/HTMLElementType";
@injectable()
-export default class HintUseCase {
+export class HintUseCase {
constructor(
@inject("HintPresenter")
private readonly presenter: HintPresenter,
diff --git a/src/content/usecases/KeymapUseCase.ts b/src/content/usecases/KeymapUseCase.ts
index 44ceadf3..a73594d4 100644
--- a/src/content/usecases/KeymapUseCase.ts
+++ b/src/content/usecases/KeymapUseCase.ts
@@ -6,7 +6,7 @@ import type { Operation } from "../../shared/operation";
import type { AddressRepository } from "../repositories/AddressRepository";
import { Keymaps } from "../../shared/keymaps";
import type { Key } from "../../shared/key";
-import KeySequence from "../domains/KeySequence";
+import { KeySequence } from "../domains/KeySequence";
const reservedKeymaps = new Keymaps({
"": { type: "cancel", props: {} },
@@ -16,7 +16,7 @@ const reservedKeymaps = new Keymaps({
const enableAddonOps = ["addon.enable", "addon.toggle.enabled"];
@injectable()
-export default class KeymapUseCase {
+export class KeymapUseCase {
constructor(
@inject("KeymapRepository")
private readonly repository: KeymapRepository,
diff --git a/src/content/usecases/NavigateUseCase.ts b/src/content/usecases/NavigateUseCase.ts
index 23445275..217216d2 100644
--- a/src/content/usecases/NavigateUseCase.ts
+++ b/src/content/usecases/NavigateUseCase.ts
@@ -2,7 +2,7 @@ import { injectable, inject } from "inversify";
import type { NavigationPresenter } from "../presenters/NavigationPresenter";
@injectable()
-export default class NavigateUseCase {
+export class NavigateUseCase {
constructor(
@inject("NavigationPresenter")
private readonly navigationPresenter: NavigationPresenter,
diff --git a/src/content/usecases/OperationUseCase.ts b/src/content/usecases/OperationUseCase.ts
index 333515ac..fe9bbd3c 100644
--- a/src/content/usecases/OperationUseCase.ts
+++ b/src/content/usecases/OperationUseCase.ts
@@ -3,7 +3,7 @@ import type { OperationClient } from "../client/OperationClient";
import type { Operation } from "../../shared/operation";
@injectable()
-export default class OperationUseCase {
+export class OperationUseCase {
constructor(
@inject("OperationClient")
private readonly operationClient: OperationClient,
diff --git a/src/content/usecases/TopFrameUseCase.ts b/src/content/usecases/TopFrameUseCase.ts
index cf0373bd..5def823e 100644
--- a/src/content/usecases/TopFrameUseCase.ts
+++ b/src/content/usecases/TopFrameUseCase.ts
@@ -2,7 +2,7 @@ import { injectable, inject } from "inversify";
import type { FrameIdRepository } from "../repositories/FrameIdRepository";
@injectable()
-export default class TopFrameUseCase {
+export class TopFrameUseCase {
constructor(
@inject("FrameIdRepository")
private readonly frameIdRepository: FrameIdRepository,
diff --git a/src/messaging/handler/Receiver.ts b/src/messaging/handler/Receiver.ts
index 3e05c78c..f0813fa5 100644
--- a/src/messaging/handler/Receiver.ts
+++ b/src/messaging/handler/Receiver.ts
@@ -25,7 +25,7 @@ export class Router<
}
}
-export default class Receiver<
+export class Receiver<
Schema extends { [Key in keyof Schema]: Duplex },
> {
private readonly routes: Map> = new Map();
diff --git a/src/messaging/handler/ReceiverWithContext.ts b/src/messaging/handler/ReceiverWithContext.ts
index 9438be03..cd6dc3aa 100644
--- a/src/messaging/handler/ReceiverWithContext.ts
+++ b/src/messaging/handler/ReceiverWithContext.ts
@@ -35,7 +35,7 @@ export class RouterWithContext<
}
}
-export default class ReceiverWithContext<
+export class ReceiverWithContext<
Schema extends { [Key in keyof Schema]: Duplex },
Context,
> {
diff --git a/src/messaging/handler/Sender.ts b/src/messaging/handler/Sender.ts
index d9d3004c..5a4372bb 100644
--- a/src/messaging/handler/Sender.ts
+++ b/src/messaging/handler/Sender.ts
@@ -7,7 +7,7 @@ export type SenderHandler<
args: Schema[keyof Schema]["Request"],
) => Promise;
-export default class Sender<
+export class Sender<
Schema extends { [Key in keyof Schema]: Duplex },
> {
private readonly sender: SenderHandler;
diff --git a/src/messaging/handler/SimplexReceiver.ts b/src/messaging/handler/SimplexReceiver.ts
index fe8b2c0c..15b26a0f 100644
--- a/src/messaging/handler/SimplexReceiver.ts
+++ b/src/messaging/handler/SimplexReceiver.ts
@@ -23,7 +23,7 @@ export class SimplexRouter<
}
}
-export default class SimplexReceiver<
+export class SimplexReceiver<
Schema extends { [Key in keyof Schema]: Simplex },
> {
private readonly routes: Map> =
diff --git a/src/messaging/handler/SimplexReceiverWithContext.ts b/src/messaging/handler/SimplexReceiverWithContext.ts
index e9a5ebec..ab712910 100644
--- a/src/messaging/handler/SimplexReceiverWithContext.ts
+++ b/src/messaging/handler/SimplexReceiverWithContext.ts
@@ -29,7 +29,7 @@ export class SimplexRouterWithContext<
}
}
-export default class SimplexReceiverWithContext<
+export class SimplexReceiverWithContext<
Schema extends { [Key in keyof Schema]: Simplex },
Context,
> {
diff --git a/src/messaging/handler/SimplexSender.ts b/src/messaging/handler/SimplexSender.ts
index 7882673d..8498a7e4 100644
--- a/src/messaging/handler/SimplexSender.ts
+++ b/src/messaging/handler/SimplexSender.ts
@@ -4,7 +4,7 @@ type SimplexSenderHandler<
Schema extends { [Key in keyof Schema]: Simplex },
> = (type: keyof Schema, args: Schema[keyof Schema]["Request"]) => void;
-export default class SimplexSender<
+export class SimplexSender<
Schema extends { [Key in keyof Schema]: Simplex },
> {
private readonly sender: SimplexSenderHandler;
diff --git a/src/messaging/index.ts b/src/messaging/index.ts
index b37361d4..4877a97f 100644
--- a/src/messaging/index.ts
+++ b/src/messaging/index.ts
@@ -1,9 +1,9 @@
-import Receiver from "./handler/Receiver";
-import ReceiverWithContext from "./handler/ReceiverWithContext";
-import Sender from "./handler/Sender";
-import SimplexReceiver from "./handler/SimplexReceiver";
-import SimplexReceiverWithContext from "./handler/SimplexReceiverWithContext";
-import SimplexSender from "./handler/SimplexSender";
+import { Receiver } from "./handler/Receiver";
+import { ReceiverWithContext } from "./handler/ReceiverWithContext";
+import { Sender } from "./handler/Sender";
+import { SimplexReceiver } from "./handler/SimplexReceiver";
+import { SimplexReceiverWithContext } from "./handler/SimplexReceiverWithContext";
+import { SimplexSender } from "./handler/SimplexSender";
export {
SimplexSender,
diff --git a/src/options/App.tsx b/src/options/App.tsx
index a042cec1..3d1a1a66 100644
--- a/src/options/App.tsx
+++ b/src/options/App.tsx
@@ -1,8 +1,8 @@
import React from "react";
import stylex from "@stylexjs/stylex";
import { useLoadSettings, useSaveSettings } from "./hooks/storage";
-import TextArea from "./components/TextArea";
-import ErrorMessage from "./components/ErrorMessage";
+import { TextArea } from "./components/TextArea";
+import { ErrorMessage } from "./components/ErrorMessage";
const styles = stylex.create({
container: {
@@ -13,7 +13,7 @@ const styles = stylex.create({
},
});
-const App: React.FC = () => {
+export const App: React.FC = () => {
const { data: loadedValue, loading, error: loadError } = useLoadSettings();
const { save, error: saveError } = useSaveSettings();
const [jsonText, setJsonText] = React.useState("");
@@ -64,5 +64,3 @@ const App: React.FC = () => {
);
};
-
-export default App;
diff --git a/src/options/components/ErrorMessage.tsx b/src/options/components/ErrorMessage.tsx
index 462835d7..e6f6b491 100644
--- a/src/options/components/ErrorMessage.tsx
+++ b/src/options/components/ErrorMessage.tsx
@@ -13,7 +13,7 @@ interface Props {
error?: Error;
}
-const ErrorMessage: React.FC = ({ error }) => {
+export const ErrorMessage: React.FC = ({ error }) => {
if (typeof error === "undefined") {
return null;
}
@@ -23,5 +23,3 @@ const ErrorMessage: React.FC = ({ error }) => {
);
};
-
-export default ErrorMessage;
diff --git a/src/options/components/TextArea.tsx b/src/options/components/TextArea.tsx
index 470c57a4..f587a5ea 100644
--- a/src/options/components/TextArea.tsx
+++ b/src/options/components/TextArea.tsx
@@ -55,7 +55,7 @@ const styles = stylex.create({
type Props = React.TextareaHTMLAttributes;
-const TextArea: React.FC = (props) => {
+export const TextArea: React.FC = (props) => {
const highlightContainer = React.useRef(null);
const container = React.useRef(null);
const content = React.useRef(null);
@@ -154,5 +154,3 @@ const TextArea: React.FC = (props) => {
);
};
-
-export default TextArea;
diff --git a/src/options/index.tsx b/src/options/index.tsx
index 7cef6ec1..34f34608 100644
--- a/src/options/index.tsx
+++ b/src/options/index.tsx
@@ -1,6 +1,6 @@
import React from "react";
import { createRoot } from "react-dom/client";
-import App from "./App";
+import { App } from "./App";
document.addEventListener("DOMContentLoaded", () => {
const wrapper = document.getElementById("vimmatic-settings");
diff --git a/test/background/command/AddBookmarkCommand.test.ts b/test/background/command/AddBookmarkCommand.test.ts
index c0ef72df..1c295296 100644
--- a/test/background/command/AddBookmarkCommand.test.ts
+++ b/test/background/command/AddBookmarkCommand.test.ts
@@ -1,6 +1,6 @@
-import AddBookmarkCommand from "../../../src/background/command/AddBookmarkCommand";
-import MockConsoleClient from "../mock/MockConsoleClient";
-import defaultTab from "../mock/defaultTab";
+import { AddBookmarkCommand } from "../../../src/background/command/AddBookmarkCommand";
+import { MockConsoleClient } from "../mock/MockConsoleClient";
+import { defaultTab } from "../mock/defaultTab";
import { describe, expect, vi, it, beforeEach } from "vitest";
describe("AddBookmarkCommand", () => {
diff --git a/test/background/command/BufferCommand.test.ts b/test/background/command/BufferCommand.test.ts
index 466db29e..a380b7f5 100644
--- a/test/background/command/BufferCommand.test.ts
+++ b/test/background/command/BufferCommand.test.ts
@@ -1,7 +1,7 @@
-import BufferCommand from "../../../src/background/command/BufferCommand";
-import BufferCommandHelper from "../../../src/background/command/BufferCommandHelper";
-import MockLastSelectedTabRepository from "../mock/MockLastSelectedTabRepository";
-import defaultTab from "../mock/defaultTab";
+import { BufferCommand } from "../../../src/background/command/BufferCommand";
+import { BufferCommandHelper } from "../../../src/background/command/BufferCommandHelper";
+import { MockLastSelectedTabRepository } from "../mock/MockLastSelectedTabRepository";
+import { defaultTab } from "../mock/defaultTab";
import { describe, beforeEach, it, vi, expect } from "vitest";
describe("BufferCommand", () => {
diff --git a/test/background/command/BufferCommandHelper.test.ts b/test/background/command/BufferCommandHelper.test.ts
index f242f415..bb8a5bf5 100644
--- a/test/background/command/BufferCommandHelper.test.ts
+++ b/test/background/command/BufferCommandHelper.test.ts
@@ -1,6 +1,6 @@
-import BufferCommandHelper from "../../../src/background/command/BufferCommandHelper";
-import MockLastSelectedTabRepository from "../mock/MockLastSelectedTabRepository";
-import defaultTab from "../mock/defaultTab";
+import { BufferCommandHelper } from "../../../src/background/command/BufferCommandHelper";
+import { MockLastSelectedTabRepository } from "../mock/MockLastSelectedTabRepository";
+import { defaultTab } from "../mock/defaultTab";
import { describe, test, expect, beforeEach, vi } from "vitest";
describe("BufferCommandHelper", () => {
diff --git a/test/background/command/BufferDeleteCommand.test.ts b/test/background/command/BufferDeleteCommand.test.ts
index c4240ee0..c48e3359 100644
--- a/test/background/command/BufferDeleteCommand.test.ts
+++ b/test/background/command/BufferDeleteCommand.test.ts
@@ -1,7 +1,7 @@
-import BufferDeleteCommand from "../../../src/background/command/BufferDeleteCommand";
-import BufferCommandHelper from "../../../src/background/command/BufferCommandHelper";
+import { BufferDeleteCommand } from "../../../src/background/command/BufferDeleteCommand";
+import { BufferCommandHelper } from "../../../src/background/command/BufferCommandHelper";
import type { CommandContext } from "../../../src/background/command/types";
-import defaultTab from "../mock/defaultTab";
+import { defaultTab } from "../mock/defaultTab";
import { describe, it, expect, beforeEach, vi } from "vitest";
describe("BufferDeleteCommand", () => {
diff --git a/test/background/command/BufferDeletesCommand.test.ts b/test/background/command/BufferDeletesCommand.test.ts
index bf4b9577..1c099166 100644
--- a/test/background/command/BufferDeletesCommand.test.ts
+++ b/test/background/command/BufferDeletesCommand.test.ts
@@ -1,6 +1,6 @@
-import BufferDeletesCommand from "../../../src/background/command/BufferDeletesCommand";
-import BufferCommandHelper from "../../../src/background/command/BufferCommandHelper";
-import defaultTab from "../mock/defaultTab";
+import { BufferDeletesCommand } from "../../../src/background/command/BufferDeletesCommand";
+import { BufferCommandHelper } from "../../../src/background/command/BufferCommandHelper";
+import { defaultTab } from "../mock/defaultTab";
import { describe, expect, beforeEach, vi, it } from "vitest";
describe("BufferDeletesCommand", () => {
diff --git a/test/background/command/HelpCommand.test.ts b/test/background/command/HelpCommand.test.ts
index c1df0fe4..d2878b7a 100644
--- a/test/background/command/HelpCommand.test.ts
+++ b/test/background/command/HelpCommand.test.ts
@@ -1,4 +1,4 @@
-import HelpCommand from "../../../src/background/command/HelpCommand";
+import { HelpCommand } from "../../../src/background/command/HelpCommand";
import { describe, it, expect, beforeEach, vi } from "vitest";
describe("HelpCommand", () => {
diff --git a/test/background/command/OpenCommandHelper.test.ts b/test/background/command/OpenCommandHelper.test.ts
index 17fba031..d31de1af 100644
--- a/test/background/command/OpenCommandHelper.test.ts
+++ b/test/background/command/OpenCommandHelper.test.ts
@@ -1,7 +1,7 @@
-import OpenCommandHelper from "../../../src/background/command/OpenCommandHelper";
+import { OpenCommandHelper } from "../../../src/background/command/OpenCommandHelper";
import type { SearchEngineSettings } from "../../../src/background/settings/SearchEngineSettings";
import type { Search } from "../../../src/shared/search";
-import MockPropertySettings from "../mock/MockPropertySettings";
+import { MockPropertySettings } from "../mock/MockPropertySettings";
import { describe, expect, beforeEach, it, vi } from "vitest";
class MockSearchEngineSettings implements SearchEngineSettings {
diff --git a/test/background/command/QuitAllCommand.test.ts b/test/background/command/QuitAllCommand.test.ts
index 0635010d..fa3c513d 100644
--- a/test/background/command/QuitAllCommand.test.ts
+++ b/test/background/command/QuitAllCommand.test.ts
@@ -1,5 +1,5 @@
-import QuitAllCommand from "../../../src/background/command/QuitAllCommand";
-import defaultTab from "../mock/defaultTab";
+import { QuitAllCommand } from "../../../src/background/command/QuitAllCommand";
+import { defaultTab } from "../mock/defaultTab";
import { describe, it, beforeEach, vi, expect } from "vitest";
describe("QuitAllCommand", () => {
diff --git a/test/background/command/QuitCommand.test.ts b/test/background/command/QuitCommand.test.ts
index 97bed418..8298949e 100644
--- a/test/background/command/QuitCommand.test.ts
+++ b/test/background/command/QuitCommand.test.ts
@@ -1,5 +1,5 @@
-import QuitCommand from "../../../src/background/command/QuitCommand";
-import defaultTab from "../mock/defaultTab";
+import { QuitCommand } from "../../../src/background/command/QuitCommand";
+import { defaultTab } from "../mock/defaultTab";
import { describe, expect, beforeEach, it, vi } from "vitest";
describe("QuitCommand", () => {
diff --git a/test/background/command/SetCommand.test.ts b/test/background/command/SetCommand.test.ts
index ca69b040..2c137a5d 100644
--- a/test/background/command/SetCommand.test.ts
+++ b/test/background/command/SetCommand.test.ts
@@ -1,8 +1,8 @@
-import SetCommand from "../../../src/background/command/SetCommand";
+import { SetCommand } from "../../../src/background/command/SetCommand";
import type { CommandContext } from "../../../src/background/command/types";
import { PropertyRegistryImpl } from "../../../src/background/property/PropertyRegistry";
-import MockPropertySettings from "../mock/MockPropertySettings";
-import MockConsoleClient from "../mock/MockConsoleClient";
+import { MockPropertySettings } from "../mock/MockPropertySettings";
+import { MockConsoleClient } from "../mock/MockConsoleClient";
import { describe, beforeEach, expect, it, vi } from "vitest";
const strprop1 = {
diff --git a/test/background/hint/OpenCommandHintAction.test.ts b/test/background/hint/OpenCommandHintAction.test.ts
index 8f3d9950..d23b9cc3 100644
--- a/test/background/hint/OpenCommandHintAction.test.ts
+++ b/test/background/hint/OpenCommandHintAction.test.ts
@@ -1,10 +1,10 @@
-import OpenCommandHintAction from "../../../src/background/hint/OpenCommandHintAction";
-import MokcHintClient from "../mock/MockHintClient";
-import MockConsoleClient from "../mock/MockConsoleClient";
+import { OpenCommandHintAction } from "../../../src/background/hint/OpenCommandHintAction";
+import { MockHintClient } from "../mock/MockHintClient";
+import { MockConsoleClient } from "../mock/MockConsoleClient";
import { describe, test, expect, vi } from "vitest";
describe("OpenCommandHintAction", () => {
- const hintClient = new MokcHintClient();
+ const hintClient = new MockHintClient();
const consoleClient = new MockConsoleClient();
const sut = new OpenCommandHintAction(hintClient, consoleClient);
diff --git a/test/background/hint/OpenHintAction.test.ts b/test/background/hint/OpenHintAction.test.ts
index 57833ba3..6335dd00 100644
--- a/test/background/hint/OpenHintAction.test.ts
+++ b/test/background/hint/OpenHintAction.test.ts
@@ -1,10 +1,10 @@
-import OpenHintAction from "../../../src/background/hint/OpenHintAction";
-import MokcHintClient from "../mock/MockHintClient";
-import MockTabPresenter from "../mock/MockTabPresenter";
+import { OpenHintAction } from "../../../src/background/hint/OpenHintAction";
+import { MockHintClient } from "../mock/MockHintClient";
+import { MockTabPresenter } from "../mock/MockTabPresenter";
import { describe, test, expect, vi } from "vitest";
describe("OpenHintAction", () => {
- const hintClient = new MokcHintClient();
+ const hintClient = new MockHintClient();
const tabPresenter = new MockTabPresenter();
const sut = new OpenHintAction(hintClient, tabPresenter);
diff --git a/test/background/hint/OpenImageHintAction.test.ts b/test/background/hint/OpenImageHintAction.test.ts
index 1584c2d0..6925c7fa 100644
--- a/test/background/hint/OpenImageHintAction.test.ts
+++ b/test/background/hint/OpenImageHintAction.test.ts
@@ -1,10 +1,10 @@
-import OpenImageHintAction from "../../../src/background/hint/OpenImageHintAction";
-import MokcHintClient from "../mock/MockHintClient";
-import MockTabPresenter from "../mock/MockTabPresenter";
+import { OpenImageHintAction } from "../../../src/background/hint/OpenImageHintAction";
+import { MockHintClient } from "../mock/MockHintClient";
+import { MockTabPresenter } from "../mock/MockTabPresenter";
import { describe, expect, beforeEach, vi, test } from "vitest";
describe("OpenImageHintAction", () => {
- const hintClient = new MokcHintClient();
+ const hintClient = new MockHintClient();
const tabPresenter = new MockTabPresenter();
const sut = new OpenImageHintAction(hintClient, tabPresenter);
diff --git a/test/background/hint/QuickHintAction.test.ts b/test/background/hint/QuickHintAction.test.ts
index 601126b0..78eb9701 100644
--- a/test/background/hint/QuickHintAction.test.ts
+++ b/test/background/hint/QuickHintAction.test.ts
@@ -1,10 +1,10 @@
-import QuickHintAction from "../../../src/background/hint/QuickHintAction";
-import MokcHintClient from "../mock/MockHintClient";
-import MockTabPresenter from "../mock/MockTabPresenter";
+import { QuickHintAction } from "../../../src/background/hint/QuickHintAction";
+import { MockHintClient } from "../mock/MockHintClient";
+import { MockTabPresenter } from "../mock/MockTabPresenter";
import { describe, test, expect, vi } from "vitest";
describe("QuickHintAction", () => {
- const hintClient = new MokcHintClient();
+ const hintClient = new MockHintClient();
const tabPresenter = new MockTabPresenter();
const sut = new QuickHintAction(hintClient, tabPresenter);
diff --git a/test/background/hint/TabopenCommandHintAction.test.ts b/test/background/hint/TabopenCommandHintAction.test.ts
index 4a88c53e..9f72bdae 100644
--- a/test/background/hint/TabopenCommandHintAction.test.ts
+++ b/test/background/hint/TabopenCommandHintAction.test.ts
@@ -1,10 +1,10 @@
-import TabopenCommandHintAction from "../../../src/background/hint/TabopenCommandHintAction";
-import MokcHintClient from "../mock/MockHintClient";
-import MockConsoleClient from "../mock/MockConsoleClient";
+import { TabopenCommandHintAction } from "../../../src/background/hint/TabopenCommandHintAction";
+import { MockHintClient } from "../mock/MockHintClient";
+import { MockConsoleClient } from "../mock/MockConsoleClient";
import { describe, test, expect, vi } from "vitest";
describe("TabopenCommandHintAction", () => {
- const hintClient = new MokcHintClient();
+ const hintClient = new MockHintClient();
const consoleClient = new MockConsoleClient();
const sut = new TabopenCommandHintAction(hintClient, consoleClient);
diff --git a/test/background/hint/TabopenHintAction.test.ts b/test/background/hint/TabopenHintAction.test.ts
index eef87357..200e8192 100644
--- a/test/background/hint/TabopenHintAction.test.ts
+++ b/test/background/hint/TabopenHintAction.test.ts
@@ -1,10 +1,10 @@
-import TabopenHintAction from "../../../src/background/hint/TabopenHintAction";
-import MokcHintClient from "../mock/MockHintClient";
-import MockTabPresenter from "../mock/MockTabPresenter";
+import { TabopenHintAction } from "../../../src/background/hint/TabopenHintAction";
+import { MockHintClient } from "../mock/MockHintClient";
+import { MockTabPresenter } from "../mock/MockTabPresenter";
import { describe, test, expect, vi } from "vitest";
describe("TabopenHintAction", () => {
- const hintClient = new MokcHintClient();
+ const hintClient = new MockHintClient();
const tabPresenter = new MockTabPresenter();
const sut = new TabopenHintAction(hintClient, tabPresenter);
diff --git a/test/background/hint/WinopenCommandHintAction.test.ts b/test/background/hint/WinopenCommandHintAction.test.ts
index f794c6e2..e8b7a721 100644
--- a/test/background/hint/WinopenCommandHintAction.test.ts
+++ b/test/background/hint/WinopenCommandHintAction.test.ts
@@ -1,10 +1,10 @@
-import WinopenCommandHintAction from "../../../src/background/hint/WinopenCommandHintAction";
-import MokcHintClient from "../mock/MockHintClient";
-import MockConsoleClient from "../mock/MockConsoleClient";
+import { WinopenCommandHintAction } from "../../../src/background/hint/WinopenCommandHintAction";
+import { MockHintClient } from "../mock/MockHintClient";
+import { MockConsoleClient } from "../mock/MockConsoleClient";
import { describe, test, expect, vi } from "vitest";
describe("WinopenCommandHintAction", () => {
- const hintClient = new MokcHintClient();
+ const hintClient = new MockHintClient();
const consoleClient = new MockConsoleClient();
const sut = new WinopenCommandHintAction(hintClient, consoleClient);
diff --git a/test/background/hint/WinopenHintAction.test.ts b/test/background/hint/WinopenHintAction.test.ts
index dab05e0a..def40dd2 100644
--- a/test/background/hint/WinopenHintAction.test.ts
+++ b/test/background/hint/WinopenHintAction.test.ts
@@ -1,10 +1,10 @@
-import WinopenHintAction from "../../../src/background/hint/WinopenHintAction";
-import MokcHintClient from "../mock/MockHintClient";
-import MockTabPresenter from "../mock/MockTabPresenter";
+import { WinopenHintAction } from "../../../src/background/hint/WinopenHintAction";
+import { MockHintClient } from "../mock/MockHintClient";
+import { MockTabPresenter } from "../mock/MockTabPresenter";
import { describe, test, vi, expect } from "vitest";
describe("WinopenHintAction", () => {
- const hintClient = new MokcHintClient();
+ const hintClient = new MockHintClient();
const tabPresenter = new MockTabPresenter();
const sut = new WinopenHintAction(hintClient, tabPresenter);
diff --git a/test/background/hint/YankLinkTextHintAction.test.ts b/test/background/hint/YankLinkTextHintAction.test.ts
index 28d07f3c..e91292c0 100644
--- a/test/background/hint/YankLinkTextHintAction.test.ts
+++ b/test/background/hint/YankLinkTextHintAction.test.ts
@@ -1,11 +1,11 @@
-import YankLinkTextHintAction from "../../../src/background/hint/YankLinkTextHintAction";
-import MokcHintClient from "../mock/MockHintClient";
-import MockConsoleClient from "../mock/MockConsoleClient";
-import MockClipboardRepository from "../mock/MockClipboardRepository";
+import { YankLinkTextHintAction } from "../../../src/background/hint/YankLinkTextHintAction";
+import { MockHintClient } from "../mock/MockHintClient";
+import { MockConsoleClient } from "../mock/MockConsoleClient";
+import { MockClipboardRepository } from "../mock/MockClipboardRepository";
import { describe, test, vi, expect } from "vitest";
describe("YankLinkTextHintAction", () => {
- const hintClient = new MokcHintClient();
+ const hintClient = new MockHintClient();
const clipboardRepository = new MockClipboardRepository();
const consoleClient = new MockConsoleClient();
const sut = new YankLinkTextHintAction(
diff --git a/test/background/hint/YankURLHintAction.test.ts b/test/background/hint/YankURLHintAction.test.ts
index 85d37ef6..8267dd69 100644
--- a/test/background/hint/YankURLHintAction.test.ts
+++ b/test/background/hint/YankURLHintAction.test.ts
@@ -1,11 +1,11 @@
-import YankURLHintAction from "../../../src/background/hint/YankURLHintAction";
-import MokcHintClient from "../mock/MockHintClient";
-import MockConsoleClient from "../mock/MockConsoleClient";
-import MockClipboardRepository from "../mock/MockClipboardRepository";
+import { YankURLHintAction } from "../../../src/background/hint/YankURLHintAction";
+import { MockHintClient } from "../mock/MockHintClient";
+import { MockConsoleClient } from "../mock/MockConsoleClient";
+import { MockClipboardRepository } from "../mock/MockClipboardRepository";
import { describe, test, vi, expect } from "vitest";
describe("YankURLHintAction", () => {
- const hintClient = new MokcHintClient();
+ const hintClient = new MockHintClient();
const clipboardRepository = new MockClipboardRepository();
const consoleClient = new MockConsoleClient();
const sut = new YankURLHintAction(
diff --git a/test/background/mock/MockAddonEnabledClient.ts b/test/background/mock/MockAddonEnabledClient.ts
deleted file mode 100644
index b26541ae..00000000
--- a/test/background/mock/MockAddonEnabledClient.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import type { AddonEnabledClient } from "../../../src/background/clients/AddonEnabledClient";
-
-export default class MockAddonEnabledClient implements AddonEnabledClient {
- enable(_tabId: number): Promise {
- throw new Error("not implemented");
- }
-
- disable(_tabId: number): Promise {
- throw new Error("not implemented");
- }
-}
diff --git a/test/background/mock/MockAddonEnabledRepository.ts b/test/background/mock/MockAddonEnabledRepository.ts
index 29938ba6..31889211 100644
--- a/test/background/mock/MockAddonEnabledRepository.ts
+++ b/test/background/mock/MockAddonEnabledRepository.ts
@@ -1,8 +1,6 @@
import type { AddonEnabledRepository } from "../../../src/background/repositories/AddonEnabledRepository";
-export default class MockAddonEnabledRepository
- implements AddonEnabledRepository
-{
+export class MockAddonEnabledRepository implements AddonEnabledRepository {
enable(): Promise {
throw new Error("not implemented");
}
diff --git a/test/background/mock/MockBrowserSettingRepository.ts b/test/background/mock/MockBrowserSettingRepository.ts
index 4c1aec96..6280be63 100644
--- a/test/background/mock/MockBrowserSettingRepository.ts
+++ b/test/background/mock/MockBrowserSettingRepository.ts
@@ -1,8 +1,6 @@
import type { BrowserSettingRepository } from "../../../src/background/repositories/BrowserSettingRepository";
-export default class MockBrowserSettingRepository
- implements BrowserSettingRepository
-{
+export class MockBrowserSettingRepository implements BrowserSettingRepository {
constructor(private readonly homepageUrls: string[]) {}
getHomepageUrls(): Promise {
diff --git a/test/background/mock/MockClipboardRepository.ts b/test/background/mock/MockClipboardRepository.ts
index 664c8e55..edfd1167 100644
--- a/test/background/mock/MockClipboardRepository.ts
+++ b/test/background/mock/MockClipboardRepository.ts
@@ -1,6 +1,6 @@
import type { ClipboardRepository } from "../../../src/background/repositories/ClipboardRepository";
-export default class MockClipboardRepository implements ClipboardRepository {
+export class MockClipboardRepository implements ClipboardRepository {
async read(): Promise {
throw new Error("not implemented");
}
diff --git a/test/background/mock/MockConsoleClient.ts b/test/background/mock/MockConsoleClient.ts
index 18ebc364..522b5bb0 100644
--- a/test/background/mock/MockConsoleClient.ts
+++ b/test/background/mock/MockConsoleClient.ts
@@ -1,6 +1,6 @@
import type { ConsoleClient } from "../../../src/background/clients/ConsoleClient";
-export default class MockConsoleClient implements ConsoleClient {
+export class MockConsoleClient implements ConsoleClient {
hide(_tabId: number): Promise {
throw new Error("not implemented");
}
diff --git a/test/background/mock/MockContentMessageClient.ts b/test/background/mock/MockContentMessageClient.ts
index 3cc5b6da..1a035032 100644
--- a/test/background/mock/MockContentMessageClient.ts
+++ b/test/background/mock/MockContentMessageClient.ts
@@ -1,6 +1,6 @@
import type { ContentMessageClient } from "../../../src/background/clients/ContentMessageClient";
-export default class MockContentMessageClient implements ContentMessageClient {
+export class MockContentMessageClient implements ContentMessageClient {
getAddonEnabled(_tabId: number, _frameId: number): Promise {
throw new Error("not implemented");
}
diff --git a/test/background/mock/MockFindClient.ts b/test/background/mock/MockFindClient.ts
index 71cb62ac..4a80a39f 100644
--- a/test/background/mock/MockFindClient.ts
+++ b/test/background/mock/MockFindClient.ts
@@ -1,7 +1,7 @@
import type { FindClient } from "../../../src/background/clients/FindClient";
import type { FindQuery } from "../../../src/shared/findQuery";
-export default class MockFindClient implements FindClient {
+export class MockFindClient implements FindClient {
findNext(
_tabId: number,
_frameId: number,
diff --git a/test/background/mock/MockFindHistoryRepository.ts b/test/background/mock/MockFindHistoryRepository.ts
index 9500624d..6858fda0 100644
--- a/test/background/mock/MockFindHistoryRepository.ts
+++ b/test/background/mock/MockFindHistoryRepository.ts
@@ -1,8 +1,6 @@
import type { FindHistoryRepository } from "../../../src/background/repositories/FindHistoryRepository";
-export default class MockFindHistoryRepository
- implements FindHistoryRepository
-{
+export class MockFindHistoryRepository implements FindHistoryRepository {
append(_keyword: string): Promise {
throw new Error("not implemented");
}
diff --git a/test/background/mock/MockFindRepository.ts b/test/background/mock/MockFindRepository.ts
index 97208168..81840b1c 100644
--- a/test/background/mock/MockFindRepository.ts
+++ b/test/background/mock/MockFindRepository.ts
@@ -3,7 +3,7 @@ import type {
FindState,
} from "../../../src/background/repositories/FindRepository";
-export default class MockFindRepository implements FindRepository {
+export class MockFindRepository implements FindRepository {
private globalKeyword: string | undefined;
private localStates: { [tabId: number]: FindState } = {};
diff --git a/test/background/mock/MockHintActionFactory.ts b/test/background/mock/MockHintActionFactory.ts
index 04a1027f..fc5b915a 100644
--- a/test/background/mock/MockHintActionFactory.ts
+++ b/test/background/mock/MockHintActionFactory.ts
@@ -20,7 +20,7 @@ class MockHintAction implements HintAction {
}
}
-export default class MockHintActionFactory implements HintActionFactory {
+export class MockHintActionFactory implements HintActionFactory {
createHintAction(name: string): HintAction {
return new MockHintAction(name);
}
diff --git a/test/background/mock/MockHintClient.ts b/test/background/mock/MockHintClient.ts
index dcc945a8..34ca6518 100644
--- a/test/background/mock/MockHintClient.ts
+++ b/test/background/mock/MockHintClient.ts
@@ -2,7 +2,7 @@ import type { HintClient } from "../../../src/background/clients/HintClient";
import type { Point, Size } from "../../../src/background/clients/HintClient";
import type { HTMLElementType } from "../../../src/shared/HTMLElementType";
-export default class MockHintClient implements HintClient {
+export class MockHintClient implements HintClient {
lookupTargets(
_tabId: number,
_frameId: number,
diff --git a/test/background/mock/MockHintRepository.ts b/test/background/mock/MockHintRepository.ts
index ee019c81..d1a55f0c 100644
--- a/test/background/mock/MockHintRepository.ts
+++ b/test/background/mock/MockHintRepository.ts
@@ -1,7 +1,7 @@
import type { HintRepository } from "../../../src/background/repositories/HintRepository";
import type { HintTarget } from "../../../src/background/hint/types";
-export default class MockHintRepository implements HintRepository {
+export class MockHintRepository implements HintRepository {
startHintMode(
_name: string,
_opts: { newTab: boolean; background: boolean },
diff --git a/test/background/mock/MockLastSelectedTabRepository.ts b/test/background/mock/MockLastSelectedTabRepository.ts
index 0d010323..2cf40dc7 100644
--- a/test/background/mock/MockLastSelectedTabRepository.ts
+++ b/test/background/mock/MockLastSelectedTabRepository.ts
@@ -1,6 +1,6 @@
import type { LastSelectedTabRepository } from "../../../src/background/repositories/LastSelectedTabRepository";
-export default class MockLastSelectedTabRepository
+export class MockLastSelectedTabRepository
implements LastSelectedTabRepository
{
getLastSelectedTabId(): Promise {
diff --git a/test/background/mock/MockLocalStorage.ts b/test/background/mock/MockLocalStorage.ts
index 6726ef9a..4a49ca0e 100644
--- a/test/background/mock/MockLocalStorage.ts
+++ b/test/background/mock/MockLocalStorage.ts
@@ -1,6 +1,6 @@
import type { LocalCache } from "../../../src/background/db/LocalStorage";
-export default class MockLocalStorage implements LocalCache {
+export class MockLocalStorage implements LocalCache {
private value: T | undefined;
constructor(private readonly initValue: T) {}
diff --git a/test/background/mock/MockMarkRepository.ts b/test/background/mock/MockMarkRepository.ts
index 57aaec2e..8ee1170a 100644
--- a/test/background/mock/MockMarkRepository.ts
+++ b/test/background/mock/MockMarkRepository.ts
@@ -4,7 +4,7 @@ import type {
LocalMark,
} from "../../../src/background/repositories/MarkRepository";
-export default class MockMarkRepository implements MarkRepository {
+export class MockMarkRepository implements MarkRepository {
getGlobalMark(_key: string): Promise {
throw new Error("not implemented");
}
diff --git a/test/background/mock/MockNavigateClient.ts b/test/background/mock/MockNavigateClient.ts
index f2878df0..d5c7e444 100644
--- a/test/background/mock/MockNavigateClient.ts
+++ b/test/background/mock/MockNavigateClient.ts
@@ -1,6 +1,6 @@
import type { NavigateClient } from "../../../src/background/clients/NavigateClient";
-export default class MockNavigateClient implements NavigateClient {
+export class MockNavigateClient implements NavigateClient {
historyNext(_tabId: number): Promise {
throw new Error("not implemented");
}
diff --git a/test/background/mock/MockPropertyRegistry.ts b/test/background/mock/MockPropertyRegistry.ts
index 6d70f092..216c79d6 100644
--- a/test/background/mock/MockPropertyRegistry.ts
+++ b/test/background/mock/MockPropertyRegistry.ts
@@ -1,7 +1,7 @@
import type { PropertyRegistry } from "../../../src/background/property/PropertyRegistry";
import type { Property } from "../../../src/background/property/types";
-class MockPropertyRegistry implements PropertyRegistry {
+export class MockPropertyRegistry implements PropertyRegistry {
register(_prop: Property): void {
throw new Error("not implemented");
}
@@ -14,5 +14,3 @@ class MockPropertyRegistry implements PropertyRegistry {
throw new Error("not implemented");
}
}
-
-export default MockPropertyRegistry;
diff --git a/test/background/mock/MockPropertySettings.ts b/test/background/mock/MockPropertySettings.ts
index 1d7a9a46..02dec0eb 100644
--- a/test/background/mock/MockPropertySettings.ts
+++ b/test/background/mock/MockPropertySettings.ts
@@ -1,6 +1,6 @@
import type { PropertySettings } from "../../../src/background/settings/PropertySettings";
-export default class MockPropertySettings implements PropertySettings {
+export class MockPropertySettings implements PropertySettings {
setProperty(_name: string, _value: string | number | boolean): Promise {
throw new Error("not implemented");
}
diff --git a/test/background/mock/MockReadyFrameRepository.ts b/test/background/mock/MockReadyFrameRepository.ts
index 7d4f7d0c..5820fe81 100644
--- a/test/background/mock/MockReadyFrameRepository.ts
+++ b/test/background/mock/MockReadyFrameRepository.ts
@@ -1,6 +1,6 @@
import type { ReadyFrameRepository } from "../../../src/background/repositories/ReadyFrameRepository";
-export default class MockReadyFrameRepository implements ReadyFrameRepository {
+export class MockReadyFrameRepository implements ReadyFrameRepository {
addFrameId(_tabId: number, _fraemId: number): Promise {
throw new Error("not implemented");
}
diff --git a/test/background/mock/MockSettingsRepository.ts b/test/background/mock/MockSettingsRepository.ts
index d3900fae..bf41406c 100644
--- a/test/background/mock/MockSettingsRepository.ts
+++ b/test/background/mock/MockSettingsRepository.ts
@@ -1,7 +1,7 @@
import type { SettingsRepository } from "../../../src/background/settings/SettingsRepository";
import type { Settings } from "../../../src/shared/settings";
-class MockSettingsRepository implements SettingsRepository {
+export class MockSettingsRepository implements SettingsRepository {
load(): Promise {
throw new Error("not implemented");
}
@@ -14,5 +14,3 @@ class MockSettingsRepository implements SettingsRepository {
throw new Error("not implemented");
}
}
-
-export default MockSettingsRepository;
diff --git a/test/background/mock/MockTabPresenter.ts b/test/background/mock/MockTabPresenter.ts
index f37b0296..257c4a02 100644
--- a/test/background/mock/MockTabPresenter.ts
+++ b/test/background/mock/MockTabPresenter.ts
@@ -3,7 +3,7 @@ import type {
Tab,
} from "../../../src/background/presenters/TabPresenter";
-export default class MockTabPresenter implements TabPresenter {
+export class MockTabPresenter implements TabPresenter {
openToTab(_url: string, _tabId: number): Promise {
throw new Error("not implemented");
}
diff --git a/test/background/mock/MockToolbarPresenter.ts b/test/background/mock/MockToolbarPresenter.ts
index 94f48dcc..e4654541 100644
--- a/test/background/mock/MockToolbarPresenter.ts
+++ b/test/background/mock/MockToolbarPresenter.ts
@@ -1,6 +1,6 @@
import type { ToolbarPresenter } from "../../../src/background/presenters/ToolbarPresenter";
-export default class MockToolbarPresenter implements ToolbarPresenter {
+export class MockToolbarPresenter implements ToolbarPresenter {
setEnabled(_enabled: boolean): Promise {
throw new Error("not implemented");
}
diff --git a/test/background/mock/MockTopFrameClient.ts b/test/background/mock/MockTopFrameClient.ts
index 51835c9c..b945e58d 100644
--- a/test/background/mock/MockTopFrameClient.ts
+++ b/test/background/mock/MockTopFrameClient.ts
@@ -4,7 +4,7 @@ import type {
Point,
} from "../../../src/background/clients/TopFrameClient";
-export default class MockTopFrameClient implements TopFrameClient {
+export class MockTopFrameClient implements TopFrameClient {
getWindowViewport(_tabId: number): Promise {
throw new Error("not implemented");
}
diff --git a/test/background/mock/defaultTab.ts b/test/background/mock/defaultTab.ts
index 2ed1dc9a..3dea950f 100644
--- a/test/background/mock/defaultTab.ts
+++ b/test/background/mock/defaultTab.ts
@@ -1,4 +1,4 @@
-const tab: chrome.tabs.Tab = {
+export const defaultTab: chrome.tabs.Tab = {
index: 0,
title: "Example",
url: "https://examle.com/",
@@ -11,6 +11,4 @@ const tab: chrome.tabs.Tab = {
discarded: false,
autoDiscardable: false,
groupId: 0,
-};
-
-export default tab;
+} as const;
diff --git a/test/background/operators/impls/CancelOperator.test.ts b/test/background/operators/impls/CancelOperator.test.ts
index 48155954..2fdf9166 100644
--- a/test/background/operators/impls/CancelOperator.test.ts
+++ b/test/background/operators/impls/CancelOperator.test.ts
@@ -1,5 +1,5 @@
-import CancelOperator from "../../../../src/background/operators/impls/CancelOperator";
-import MockConsoleClient from "../../mock/MockConsoleClient";
+import { CancelOperator } from "../../../../src/background/operators/impls/CancelOperator";
+import { MockConsoleClient } from "../../mock/MockConsoleClient";
import type { OperatorContext } from "../../../../src/background/operators/types";
import { describe, expect, it, vi } from "vitest";
diff --git a/test/background/operators/impls/CloseTabOperator.test.ts b/test/background/operators/impls/CloseTabOperator.test.ts
index 818ac147..6ab33a19 100644
--- a/test/background/operators/impls/CloseTabOperator.test.ts
+++ b/test/background/operators/impls/CloseTabOperator.test.ts
@@ -1,5 +1,5 @@
-import CloseTabOperator from "../../../../src/background/operators/impls/CloseTabOperator";
-import defaultTab from "../../mock/defaultTab";
+import { CloseTabOperator } from "../../../../src/background/operators/impls/CloseTabOperator";
+import { defaultTab } from "../../mock/defaultTab";
import { describe, expect, beforeEach, it, vi } from "vitest";
describe("CloseTabOperator", () => {
diff --git a/test/background/operators/impls/CloseTabRightOperator.test.ts b/test/background/operators/impls/CloseTabRightOperator.test.ts
index d87908f6..6b733e94 100644
--- a/test/background/operators/impls/CloseTabRightOperator.test.ts
+++ b/test/background/operators/impls/CloseTabRightOperator.test.ts
@@ -1,5 +1,5 @@
-import CloseTabRightOperator from "../../../../src/background/operators/impls/CloseTabRightOperator";
-import defaultTab from "../../mock/defaultTab";
+import { CloseTabRightOperator } from "../../../../src/background/operators/impls/CloseTabRightOperator";
+import { defaultTab } from "../../mock/defaultTab";
import { describe, expect, it, vi } from "vitest";
describe("CloseTabRightOperator", () => {
diff --git a/test/background/operators/impls/DuplicateTabOperator.test.ts b/test/background/operators/impls/DuplicateTabOperator.test.ts
index fdfa6158..8f29baee 100644
--- a/test/background/operators/impls/DuplicateTabOperator.test.ts
+++ b/test/background/operators/impls/DuplicateTabOperator.test.ts
@@ -1,4 +1,4 @@
-import DuplicateTabOperator from "../../../../src/background/operators/impls/DuplicateTabOperator";
+import { DuplicateTabOperator } from "../../../../src/background/operators/impls/DuplicateTabOperator";
import type { OperatorContext } from "../../../../src/background/operators/types";
import { describe, expect, it, vi } from "vitest";
diff --git a/test/background/operators/impls/NavigateHistoryNextOperator.test.ts b/test/background/operators/impls/NavigateHistoryNextOperator.test.ts
index 51723533..3b4e760e 100644
--- a/test/background/operators/impls/NavigateHistoryNextOperator.test.ts
+++ b/test/background/operators/impls/NavigateHistoryNextOperator.test.ts
@@ -1,5 +1,5 @@
-import NavigateHistoryNextOperator from "../../../../src/background/operators/impls/NavigateHistoryNextOperator";
-import MockNavigateClient from "../../mock/MockNavigateClient";
+import { NavigateHistoryNextOperator } from "../../../../src/background/operators/impls/NavigateHistoryNextOperator";
+import { MockNavigateClient } from "../../mock/MockNavigateClient";
import type { OperatorContext } from "../../../../src/background/operators/types";
import { describe, it, expect, vi } from "vitest";
diff --git a/test/background/operators/impls/NavigateHistoryPrevOperator.test.ts b/test/background/operators/impls/NavigateHistoryPrevOperator.test.ts
index 824cfed3..c168512d 100644
--- a/test/background/operators/impls/NavigateHistoryPrevOperator.test.ts
+++ b/test/background/operators/impls/NavigateHistoryPrevOperator.test.ts
@@ -1,5 +1,5 @@
-import NavigateHistoryPrevOperator from "../../../../src/background/operators/impls/NavigateHistoryPrevOperator";
-import MockNavigateClient from "../../mock/MockNavigateClient";
+import { NavigateHistoryPrevOperator } from "../../../../src/background/operators/impls/NavigateHistoryPrevOperator";
+import { MockNavigateClient } from "../../mock/MockNavigateClient";
import type { OperatorContext } from "../../../../src/background/operators/types";
import { describe, it, expect, vi } from "vitest";
diff --git a/test/background/operators/impls/NavigateLinkNextOperator.test.ts b/test/background/operators/impls/NavigateLinkNextOperator.test.ts
index 0e0cab4b..87f1d36d 100644
--- a/test/background/operators/impls/NavigateLinkNextOperator.test.ts
+++ b/test/background/operators/impls/NavigateLinkNextOperator.test.ts
@@ -1,5 +1,5 @@
-import NavigateLinkNextOperator from "../../../../src/background/operators/impls/NavigateLinkNextOperator";
-import MockNavigateClient from "../../mock/MockNavigateClient";
+import { NavigateLinkNextOperator } from "../../../../src/background/operators/impls/NavigateLinkNextOperator";
+import { MockNavigateClient } from "../../mock/MockNavigateClient";
import type { OperatorContext } from "../../../../src/background/operators/types";
import { describe, it, expect, vi } from "vitest";
diff --git a/test/background/operators/impls/NavigateLinkPrevOperator.test.ts b/test/background/operators/impls/NavigateLinkPrevOperator.test.ts
index 964643ea..ba7ba5a8 100644
--- a/test/background/operators/impls/NavigateLinkPrevOperator.test.ts
+++ b/test/background/operators/impls/NavigateLinkPrevOperator.test.ts
@@ -1,5 +1,5 @@
-import NavigateLinkPrevOperator from "../../../../src/background/operators/impls/NavigateLinkPrevOperator";
-import MockNavigateClient from "../../mock/MockNavigateClient";
+import { NavigateLinkPrevOperator } from "../../../../src/background/operators/impls/NavigateLinkPrevOperator";
+import { MockNavigateClient } from "../../mock/MockNavigateClient";
import type { OperatorContext } from "../../../../src/background/operators/types";
import { describe, it, expect, vi } from "vitest";
diff --git a/test/background/operators/impls/NavigateParentOperator.test.ts b/test/background/operators/impls/NavigateParentOperator.test.ts
index 8bae02a0..8cc33f9a 100644
--- a/test/background/operators/impls/NavigateParentOperator.test.ts
+++ b/test/background/operators/impls/NavigateParentOperator.test.ts
@@ -1,4 +1,4 @@
-import NavigateParentOperator from "../../../../src/background/operators/impls/NavigateParentOperator";
+import { NavigateParentOperator } from "../../../../src/background/operators/impls/NavigateParentOperator";
import type { OperatorContext } from "../../../../src/background/operators/types";
import { describe, beforeEach, it, expect, vi } from "vitest";
diff --git a/test/background/operators/impls/NavigateRootOperator.test.ts b/test/background/operators/impls/NavigateRootOperator.test.ts
index 684342e5..e7ae2d1f 100644
--- a/test/background/operators/impls/NavigateRootOperator.test.ts
+++ b/test/background/operators/impls/NavigateRootOperator.test.ts
@@ -1,4 +1,4 @@
-import NavigateRootOperator from "../../../../src/background/operators/impls/NavigateRootOperator";
+import { NavigateRootOperator } from "../../../../src/background/operators/impls/NavigateRootOperator";
import type { OperatorContext } from "../../../../src/background/operators/types";
import { describe, it, expect, vi } from "vitest";
diff --git a/test/background/operators/impls/OpenHomeOperator.test.ts b/test/background/operators/impls/OpenHomeOperator.test.ts
index 733f569a..ea8aed52 100644
--- a/test/background/operators/impls/OpenHomeOperator.test.ts
+++ b/test/background/operators/impls/OpenHomeOperator.test.ts
@@ -1,5 +1,5 @@
-import OpenHomeOperator from "../../../../src/background/operators/impls/OpenHomeOperator";
-import MockBrowserSettingRepository from "../../mock/MockBrowserSettingRepository";
+import { OpenHomeOperator } from "../../../../src/background/operators/impls/OpenHomeOperator";
+import { MockBrowserSettingRepository } from "../../mock/MockBrowserSettingRepository";
import type { OperatorContext } from "../../../../src/background/operators/types";
import { describe, it, expect, vi } from "vitest";
diff --git a/test/background/operators/impls/OpenSourceOperator.test.ts b/test/background/operators/impls/OpenSourceOperator.test.ts
index 1a048e0f..25d23fea 100644
--- a/test/background/operators/impls/OpenSourceOperator.test.ts
+++ b/test/background/operators/impls/OpenSourceOperator.test.ts
@@ -1,4 +1,4 @@
-import OpenSourceOperator from "../../../../src/background/operators/impls/OpenSourceOperator";
+import { OpenSourceOperator } from "../../../../src/background/operators/impls/OpenSourceOperator";
import type { OperatorContext } from "../../../../src/background/operators/types";
import { describe, it, expect, vi } from "vitest";
diff --git a/test/background/operators/impls/PinTabOperator.test.ts b/test/background/operators/impls/PinTabOperator.test.ts
index e48255ab..370b0d8c 100644
--- a/test/background/operators/impls/PinTabOperator.test.ts
+++ b/test/background/operators/impls/PinTabOperator.test.ts
@@ -1,4 +1,4 @@
-import PinTabOperator from "../../../../src/background/operators/impls/PinTabOperator";
+import { PinTabOperator } from "../../../../src/background/operators/impls/PinTabOperator";
import { describe, it, expect, vi } from "vitest";
describe("PinTabOperator", () => {
diff --git a/test/background/operators/impls/ReloadTabOperator.test.ts b/test/background/operators/impls/ReloadTabOperator.test.ts
index a26762fe..94c84580 100644
--- a/test/background/operators/impls/ReloadTabOperator.test.ts
+++ b/test/background/operators/impls/ReloadTabOperator.test.ts
@@ -1,4 +1,4 @@
-import ReloadTabOperator from "../../../../src/background/operators/impls/ReloadTabOperator";
+import { ReloadTabOperator } from "../../../../src/background/operators/impls/ReloadTabOperator";
import type { OperatorContext } from "../../../../src/background/operators/types";
import { describe, beforeEach, it, expect, vi } from "vitest";
diff --git a/test/background/operators/impls/ReopenTabOperator.test.ts b/test/background/operators/impls/ReopenTabOperator.test.ts
index 18ce2a87..07c66836 100644
--- a/test/background/operators/impls/ReopenTabOperator.test.ts
+++ b/test/background/operators/impls/ReopenTabOperator.test.ts
@@ -1,5 +1,5 @@
-import ReopenTabOperator from "../../../../src/background/operators/impls/ReopenTabOperator";
-import defaultTab from "../../mock/defaultTab";
+import { ReopenTabOperator } from "../../../../src/background/operators/impls/ReopenTabOperator";
+import { defaultTab } from "../../mock/defaultTab";
import { describe, it, expect, vi } from "vitest";
describe("ReopenTabOperator", () => {
diff --git a/test/background/operators/impls/RepeatLastOperator.test.ts b/test/background/operators/impls/RepeatLastOperator.test.ts
index 76fd7d45..302257d3 100644
--- a/test/background/operators/impls/RepeatLastOperator.test.ts
+++ b/test/background/operators/impls/RepeatLastOperator.test.ts
@@ -1,4 +1,4 @@
-import RepeatLastOperator from "../../../../src/background/operators/impls/RepeatLastOperator";
+import { RepeatLastOperator } from "../../../../src/background/operators/impls/RepeatLastOperator";
import type { RepeatRepository } from "../../../../src/background/repositories/RepeatRepository";
import type { OperatorRegistory } from "../../../../src/background/operators/OperatorRegistory";
import type {
diff --git a/test/background/operators/impls/SelectFirstTabOperator.test.ts b/test/background/operators/impls/SelectFirstTabOperator.test.ts
index 1f34db62..95421a97 100644
--- a/test/background/operators/impls/SelectFirstTabOperator.test.ts
+++ b/test/background/operators/impls/SelectFirstTabOperator.test.ts
@@ -1,5 +1,5 @@
-import SelectFirstTabOperator from "../../../../src/background/operators/impls/SelectFirstTabOperator";
-import defaultTab from "../../mock/defaultTab";
+import { SelectFirstTabOperator } from "../../../../src/background/operators/impls/SelectFirstTabOperator";
+import { defaultTab } from "../../mock/defaultTab";
import { describe, it, expect, vi } from "vitest";
describe("SelectFirstTabOperator", () => {
diff --git a/test/background/operators/impls/SelectLastTabOperator.test.ts b/test/background/operators/impls/SelectLastTabOperator.test.ts
index 3b1a459d..4a90e458 100644
--- a/test/background/operators/impls/SelectLastTabOperator.test.ts
+++ b/test/background/operators/impls/SelectLastTabOperator.test.ts
@@ -1,5 +1,5 @@
-import SelectLastTabOperator from "../../../../src/background/operators/impls/SelectLastTabOperator";
-import defaultTab from "../../mock/defaultTab";
+import { SelectLastTabOperator } from "../../../../src/background/operators/impls/SelectLastTabOperator";
+import { defaultTab } from "../../mock/defaultTab";
import { describe, it, expect, vi } from "vitest";
describe("SelectLastTabOperator", () => {
diff --git a/test/background/operators/impls/SelectPreviousSelectedTabOperator.test.ts b/test/background/operators/impls/SelectPreviousSelectedTabOperator.test.ts
index f0bc5c36..cf24749a 100644
--- a/test/background/operators/impls/SelectPreviousSelectedTabOperator.test.ts
+++ b/test/background/operators/impls/SelectPreviousSelectedTabOperator.test.ts
@@ -1,5 +1,5 @@
-import SelectPreviousSelectedTabOperator from "../../../../src/background/operators/impls/SelectPreviousSelectedTabOperator";
-import MockLastSelectedTabRepository from "../../mock/MockLastSelectedTabRepository";
+import { SelectPreviousSelectedTabOperator } from "../../../../src/background/operators/impls/SelectPreviousSelectedTabOperator";
+import { MockLastSelectedTabRepository } from "../../mock/MockLastSelectedTabRepository";
import { describe, beforeEach, it, expect, vi } from "vitest";
describe("SelectPreviousSelectedTabOperator", () => {
diff --git a/test/background/operators/impls/SelectTabNextOperator.test.ts b/test/background/operators/impls/SelectTabNextOperator.test.ts
index e5071fd7..d534c5ff 100644
--- a/test/background/operators/impls/SelectTabNextOperator.test.ts
+++ b/test/background/operators/impls/SelectTabNextOperator.test.ts
@@ -1,5 +1,5 @@
-import SelectTabNextOperator from "../../../../src/background/operators/impls/SelectTabNextOperator";
-import defaultTab from "../../mock/defaultTab";
+import { SelectTabNextOperator } from "../../../../src/background/operators/impls/SelectTabNextOperator";
+import { defaultTab } from "../../mock/defaultTab";
import { describe, beforeEach, it, expect, vi } from "vitest";
describe("SelectTabNextOperator", () => {
diff --git a/test/background/operators/impls/SelectTabPrevOperator.test.ts b/test/background/operators/impls/SelectTabPrevOperator.test.ts
index 960231dc..f00fa970 100644
--- a/test/background/operators/impls/SelectTabPrevOperator.test.ts
+++ b/test/background/operators/impls/SelectTabPrevOperator.test.ts
@@ -1,5 +1,5 @@
-import SelectTabPrevOperator from "../../../../src/background/operators/impls/SelectTabPrevOperator";
-import defaultTab from "../../mock/defaultTab";
+import { SelectTabPrevOperator } from "../../../../src/background/operators/impls/SelectTabPrevOperator";
+import { defaultTab } from "../../mock/defaultTab";
import { describe, beforeEach, it, expect, vi } from "vitest";
describe("SelectTabPrevOperator", () => {
diff --git a/test/background/operators/impls/ShowAddBookmarkOperator.test.ts b/test/background/operators/impls/ShowAddBookmarkOperator.test.ts
index 5d10f159..ea50b40e 100644
--- a/test/background/operators/impls/ShowAddBookmarkOperator.test.ts
+++ b/test/background/operators/impls/ShowAddBookmarkOperator.test.ts
@@ -1,5 +1,5 @@
-import ShowAddBookmarkOperator from "../../../../src/background/operators/impls/ShowAddBookmarkOperator";
-import MockConsoleClient from "../../mock/MockConsoleClient";
+import { ShowAddBookmarkOperator } from "../../../../src/background/operators/impls/ShowAddBookmarkOperator";
+import { MockConsoleClient } from "../../mock/MockConsoleClient";
import type { OperatorContext } from "../../../../src/background/operators/types";
import { describe, beforeEach, it, expect, vi } from "vitest";
diff --git a/test/background/operators/impls/ShowBufferCommandOperator.test.ts b/test/background/operators/impls/ShowBufferCommandOperator.test.ts
index 2dac238c..4ab4e8db 100644
--- a/test/background/operators/impls/ShowBufferCommandOperator.test.ts
+++ b/test/background/operators/impls/ShowBufferCommandOperator.test.ts
@@ -1,5 +1,5 @@
-import ShowBufferCommandOperator from "../../../../src/background/operators/impls/ShowBufferCommandOperator";
-import MockConsoleClient from "../../mock/MockConsoleClient";
+import { ShowBufferCommandOperator } from "../../../../src/background/operators/impls/ShowBufferCommandOperator";
+import { MockConsoleClient } from "../../mock/MockConsoleClient";
import type { OperatorContext } from "../../../../src/background/operators/types";
import { describe, it, expect, vi } from "vitest";
diff --git a/test/background/operators/impls/ShowCommandOperator.test.ts b/test/background/operators/impls/ShowCommandOperator.test.ts
index 2d8132b3..b6355e3d 100644
--- a/test/background/operators/impls/ShowCommandOperator.test.ts
+++ b/test/background/operators/impls/ShowCommandOperator.test.ts
@@ -1,5 +1,5 @@
-import ShowCommandOperator from "../../../../src/background/operators/impls/ShowCommandOperator";
-import MockConsoleClient from "../../mock/MockConsoleClient";
+import { ShowCommandOperator } from "../../../../src/background/operators/impls/ShowCommandOperator";
+import { MockConsoleClient } from "../../mock/MockConsoleClient";
import type { OperatorContext } from "../../../../src/background/operators/types";
import { describe, beforeEach, it, expect, vi } from "vitest";
diff --git a/test/background/operators/impls/ShowOpenCommandOperator.test.ts b/test/background/operators/impls/ShowOpenCommandOperator.test.ts
index 08ff9d5d..aa961600 100644
--- a/test/background/operators/impls/ShowOpenCommandOperator.test.ts
+++ b/test/background/operators/impls/ShowOpenCommandOperator.test.ts
@@ -1,5 +1,5 @@
-import ShowOpenCommandOperator from "../../../../src/background/operators/impls/ShowOpenCommandOperator";
-import MockConsoleClient from "../../mock/MockConsoleClient";
+import { ShowOpenCommandOperator } from "../../../../src/background/operators/impls/ShowOpenCommandOperator";
+import { MockConsoleClient } from "../../mock/MockConsoleClient";
import type { OperatorContext } from "../../../../src/background/operators/types";
import { describe, beforeEach, it, expect, vi } from "vitest";
diff --git a/test/background/operators/impls/ShowTabOpenCommandOperator.test.ts b/test/background/operators/impls/ShowTabOpenCommandOperator.test.ts
index 04d85c30..5209ecc3 100644
--- a/test/background/operators/impls/ShowTabOpenCommandOperator.test.ts
+++ b/test/background/operators/impls/ShowTabOpenCommandOperator.test.ts
@@ -1,5 +1,5 @@
-import ShowTabOpenCommandOperator from "../../../../src/background/operators/impls/ShowTabOpenCommandOperator";
-import MockConsoleClient from "../../mock/MockConsoleClient";
+import { ShowTabOpenCommandOperator } from "../../../../src/background/operators/impls/ShowTabOpenCommandOperator";
+import { MockConsoleClient } from "../../mock/MockConsoleClient";
import type { OperatorContext } from "../../../../src/background/operators/types";
import { describe, beforeEach, it, expect, vi } from "vitest";
diff --git a/test/background/operators/impls/ShowWinOpenCommandOperator.test.ts b/test/background/operators/impls/ShowWinOpenCommandOperator.test.ts
index e7e0404b..73c4755e 100644
--- a/test/background/operators/impls/ShowWinOpenCommandOperator.test.ts
+++ b/test/background/operators/impls/ShowWinOpenCommandOperator.test.ts
@@ -1,5 +1,5 @@
-import ShowWinOpenCommandOperator from "../../../../src/background/operators/impls/ShowWinOpenCommandOperator";
-import MockConsoleClient from "../../mock/MockConsoleClient";
+import { ShowWinOpenCommandOperator } from "../../../../src/background/operators/impls/ShowWinOpenCommandOperator";
+import { MockConsoleClient } from "../../mock/MockConsoleClient";
import type { OperatorContext } from "../../../../src/background/operators/types";
import { describe, beforeEach, it, expect, vi } from "vitest";
diff --git a/test/background/operators/impls/StartFindOperator.test.ts b/test/background/operators/impls/StartFindOperator.test.ts
index c0b6f0fe..4b44ee17 100644
--- a/test/background/operators/impls/StartFindOperator.test.ts
+++ b/test/background/operators/impls/StartFindOperator.test.ts
@@ -1,5 +1,5 @@
-import StartFindOperator from "../../../../src/background/operators/impls/StartFindOperator";
-import MockConsoleClient from "../../mock/MockConsoleClient";
+import { StartFindOperator } from "../../../../src/background/operators/impls/StartFindOperator";
+import { MockConsoleClient } from "../../mock/MockConsoleClient";
import type { OperatorContext } from "../../../../src/background/operators/types";
import { describe, it, expect, vi } from "vitest";
diff --git a/test/background/operators/impls/TogglePinnedTabOperator.test.ts b/test/background/operators/impls/TogglePinnedTabOperator.test.ts
index 3364ff80..11fe8f6d 100644
--- a/test/background/operators/impls/TogglePinnedTabOperator.test.ts
+++ b/test/background/operators/impls/TogglePinnedTabOperator.test.ts
@@ -1,4 +1,4 @@
-import TogglePinnedTabOperator from "../../../../src/background/operators/impls/TogglePinnedTabOperator";
+import { TogglePinnedTabOperator } from "../../../../src/background/operators/impls/TogglePinnedTabOperator";
import type { OperatorContext } from "../../../../src/background/operators/types";
import { describe, it, expect, vi } from "vitest";
diff --git a/test/background/operators/impls/UnpinTabOperator.test.ts b/test/background/operators/impls/UnpinTabOperator.test.ts
index 5ef8c312..cedbb3a8 100644
--- a/test/background/operators/impls/UnpinTabOperator.test.ts
+++ b/test/background/operators/impls/UnpinTabOperator.test.ts
@@ -1,4 +1,4 @@
-import UnpinTabOperator from "../../../../src/background/operators/impls/UnpinTabOperator";
+import { UnpinTabOperator } from "../../../../src/background/operators/impls/UnpinTabOperator";
import { describe, it, expect, vi } from "vitest";
describe("UnpinTabOperator", () => {
diff --git a/test/background/operators/impls/ZoomInOperator.test.ts b/test/background/operators/impls/ZoomInOperator.test.ts
index 1981a49f..33f037c1 100644
--- a/test/background/operators/impls/ZoomInOperator.test.ts
+++ b/test/background/operators/impls/ZoomInOperator.test.ts
@@ -1,4 +1,4 @@
-import ZoomInOperator from "../../../../src/background/operators/impls/ZoomInOperator";
+import { ZoomInOperator } from "../../../../src/background/operators/impls/ZoomInOperator";
import type { OperatorContext } from "../../../../src/background/operators/types";
import { describe, it, expect, vi } from "vitest";
diff --git a/test/background/operators/impls/ZoomOutOperator.test.ts b/test/background/operators/impls/ZoomOutOperator.test.ts
index 712571fe..6a368b5f 100644
--- a/test/background/operators/impls/ZoomOutOperator.test.ts
+++ b/test/background/operators/impls/ZoomOutOperator.test.ts
@@ -1,4 +1,4 @@
-import ZoomOutOperator from "../../../../src/background/operators/impls/ZoomOutOperator";
+import { ZoomOutOperator } from "../../../../src/background/operators/impls/ZoomOutOperator";
import type { OperatorContext } from "../../../../src/background/operators/types";
import { describe, it, expect, vi } from "vitest";
diff --git a/test/background/operators/impls/ZoomResetOperator.test.ts b/test/background/operators/impls/ZoomResetOperator.test.ts
index 044812e8..7569074a 100644
--- a/test/background/operators/impls/ZoomResetOperator.test.ts
+++ b/test/background/operators/impls/ZoomResetOperator.test.ts
@@ -1,4 +1,4 @@
-import ZoomResetOperator from "../../../../src/background/operators/impls/ZoomResetOperator";
+import { ZoomResetOperator } from "../../../../src/background/operators/impls/ZoomResetOperator";
import { describe, it, expect, vi } from "vitest";
describe("ResetZoomOperator", () => {
diff --git a/test/background/property/ColorSchemeProperty.test.ts b/test/background/property/ColorSchemeProperty.test.ts
index 9da43642..fd2ba7d9 100644
--- a/test/background/property/ColorSchemeProperty.test.ts
+++ b/test/background/property/ColorSchemeProperty.test.ts
@@ -1,4 +1,4 @@
-import ColorSchemeProperty from "../../../src/background/property/ColorSchemeProperty";
+import { ColorSchemeProperty } from "../../../src/background/property/ColorSchemeProperty";
import { describe, test, expect } from "vitest";
describe("ColorSchemeProperty", () => {
diff --git a/test/background/property/CompleteProperty.test.ts b/test/background/property/CompleteProperty.test.ts
index 1d3cb6a5..c90c17b4 100644
--- a/test/background/property/CompleteProperty.test.ts
+++ b/test/background/property/CompleteProperty.test.ts
@@ -1,4 +1,4 @@
-import CompleteProperty from "../../../src/background/property/CompleteProperty";
+import { CompleteProperty } from "../../../src/background/property/CompleteProperty";
import { describe, test, expect } from "vitest";
describe("CompleteProperty", () => {
diff --git a/test/background/property/HintcharsProperty.test.ts b/test/background/property/HintcharsProperty.test.ts
index 22beba57..83e11af1 100644
--- a/test/background/property/HintcharsProperty.test.ts
+++ b/test/background/property/HintcharsProperty.test.ts
@@ -1,4 +1,4 @@
-import HintcharsProperty from "../../../src/background/property/HintcharsProperty";
+import { HintcharsProperty } from "../../../src/background/property/HintcharsProperty";
import { describe, test, expect } from "vitest";
describe("HintcharsProperty", () => {
diff --git a/test/background/property/SmoothScrollProperty.test.ts b/test/background/property/SmoothScrollProperty.test.ts
index 1fa6985a..47bafb9c 100644
--- a/test/background/property/SmoothScrollProperty.test.ts
+++ b/test/background/property/SmoothScrollProperty.test.ts
@@ -1,4 +1,4 @@
-import SmoothScrollProperty from "../../../src/background/property/SmoothScrollProperty";
+import { SmoothScrollProperty } from "../../../src/background/property/SmoothScrollProperty";
import { describe, test, expect } from "vitest";
describe("SmoothScrollProperty", () => {
diff --git a/test/background/repositories/AddonEnabledRepository.test.ts b/test/background/repositories/AddonEnabledRepository.test.ts
index 672e2c54..ab257e39 100644
--- a/test/background/repositories/AddonEnabledRepository.test.ts
+++ b/test/background/repositories/AddonEnabledRepository.test.ts
@@ -1,5 +1,5 @@
import { AddonEnabledRepositoryImpl } from "../../../src/background/repositories/AddonEnabledRepository";
-import MockLocalStorage from "../mock/MockLocalStorage";
+import { MockLocalStorage } from "../mock/MockLocalStorage";
import { describe, it, vi, expect } from "vitest";
describe("AddonEnabledRepositoryImpl", () => {
diff --git a/test/background/repositories/FindHistoryRepository.test.ts b/test/background/repositories/FindHistoryRepository.test.ts
index 09d8436d..194cb4a0 100644
--- a/test/background/repositories/FindHistoryRepository.test.ts
+++ b/test/background/repositories/FindHistoryRepository.test.ts
@@ -1,5 +1,5 @@
import { FindHistoryRepositoryImpl } from "../../../src/background/repositories/FindHistoryRepository";
-import MockLocalStorage from "../mock/MockLocalStorage";
+import { MockLocalStorage } from "../mock/MockLocalStorage";
import { describe, it, expect } from "vitest";
describe(FindHistoryRepositoryImpl.name, () => {
diff --git a/test/background/repositories/FindRepository.test.ts b/test/background/repositories/FindRepository.test.ts
index 8f05db6d..1194c014 100644
--- a/test/background/repositories/FindRepository.test.ts
+++ b/test/background/repositories/FindRepository.test.ts
@@ -1,5 +1,5 @@
import { FindRepositoryImpl } from "../../../src/background/repositories/FindRepository";
-import MockLocalStorage from "../mock/MockLocalStorage";
+import { MockLocalStorage } from "../mock/MockLocalStorage";
import { describe, beforeEach, it, expect } from "vitest";
describe("background/repositories/FindRepositoryImpl", () => {
diff --git a/test/background/repositories/HintRepository.test.ts b/test/background/repositories/HintRepository.test.ts
index 48ab15c4..d6256463 100644
--- a/test/background/repositories/HintRepository.test.ts
+++ b/test/background/repositories/HintRepository.test.ts
@@ -1,5 +1,5 @@
import { HintRepositoryImpl } from "../../../src/background/repositories/HintRepository";
-import MockLocalStorage from "../mock/MockLocalStorage";
+import { MockLocalStorage } from "../mock/MockLocalStorage";
import { describe, it, expect } from "vitest";
describe("HintRepositoryImpl", () => {
diff --git a/test/background/repositories/LastSelectedTabRepository.test.ts b/test/background/repositories/LastSelectedTabRepository.test.ts
index 7b104c62..5fb64656 100644
--- a/test/background/repositories/LastSelectedTabRepository.test.ts
+++ b/test/background/repositories/LastSelectedTabRepository.test.ts
@@ -1,5 +1,5 @@
import { LastSelectedTabRepositoryImpl } from "../../../src/background/repositories/LastSelectedTabRepository";
-import MockLocalStorage from "../mock/MockLocalStorage";
+import { MockLocalStorage } from "../mock/MockLocalStorage";
import { describe, it, expect } from "vitest";
describe("LastSelectedTabRepositoryImpl", () => {
diff --git a/test/background/repositories/MarkRepository.test.ts b/test/background/repositories/MarkRepository.test.ts
index 1fce4b92..a0556dc5 100644
--- a/test/background/repositories/MarkRepository.test.ts
+++ b/test/background/repositories/MarkRepository.test.ts
@@ -1,5 +1,5 @@
import { MarkRepositoryImpl } from "../../../src/background/repositories/MarkRepository";
-import MockLocalStorage from "../mock/MockLocalStorage";
+import { MockLocalStorage } from "../mock/MockLocalStorage";
import { describe, it, expect } from "vitest";
describe("MarkRepositoryImpl", () => {
diff --git a/test/background/repositories/ReadyFrameRepository.test.ts b/test/background/repositories/ReadyFrameRepository.test.ts
index 1268b6bf..370334f6 100644
--- a/test/background/repositories/ReadyFrameRepository.test.ts
+++ b/test/background/repositories/ReadyFrameRepository.test.ts
@@ -1,5 +1,5 @@
import { ReadyFrameRepositoryImpl } from "../../../src/background/repositories/ReadyFrameRepository";
-import MockLocalStorage from "../mock/MockLocalStorage";
+import { MockLocalStorage } from "../mock/MockLocalStorage";
import { describe, it, expect } from "vitest";
describe("ReadyFrameRepositoryImpl", () => {
diff --git a/test/background/settings/PropertySettings.test.ts b/test/background/settings/PropertySettings.test.ts
index 86a893b3..8085b88e 100644
--- a/test/background/settings/PropertySettings.test.ts
+++ b/test/background/settings/PropertySettings.test.ts
@@ -4,8 +4,8 @@ import type {
PropertyType,
PropertyTypeName,
} from "../../../src/background/property/types";
-import MockSettingsRepository from "../mock/MockSettingsRepository";
-import MockPropertyRegistry from "../mock/MockPropertyRegistry";
+import { MockSettingsRepository } from "../mock/MockSettingsRepository";
+import { MockPropertyRegistry } from "../mock/MockPropertyRegistry";
import { describe, beforeEach, it, vi, expect } from "vitest";
class MyProp implements Property {
diff --git a/test/background/settings/SettingsRepository.test.ts b/test/background/settings/SettingsRepository.test.ts
index 24050c44..a08a6994 100644
--- a/test/background/settings/SettingsRepository.test.ts
+++ b/test/background/settings/SettingsRepository.test.ts
@@ -3,7 +3,7 @@ import {
TransientSettingsRepository,
} from "../../../src/background/settings/SettingsRepository";
import type { Settings } from "../../../src/shared/settings";
-import MockLocalStorage from "../mock/MockLocalStorage";
+import { MockLocalStorage } from "../mock/MockLocalStorage";
import { describe, beforeEach, it, vi, expect } from "vitest";
describe("PermanentSettingsRepository", () => {
diff --git a/test/background/settings/StyleSettings.test.ts b/test/background/settings/StyleSettings.test.ts
index 0978f32f..91d95620 100644
--- a/test/background/settings/StyleSettings.test.ts
+++ b/test/background/settings/StyleSettings.test.ts
@@ -1,5 +1,5 @@
import { StyleSettingsImpl } from "../../../src/background/settings/StyleSettings";
-import MockSettingsRepository from "../mock/MockSettingsRepository";
+import { MockSettingsRepository } from "../mock/MockSettingsRepository";
import { describe, beforeEach, it, vi, expect } from "vitest";
describe("StyleSettingsImpl", () => {
diff --git a/test/background/settings/Validator.test.ts b/test/background/settings/Validator.test.ts
index b7bac927..223bc816 100644
--- a/test/background/settings/Validator.test.ts
+++ b/test/background/settings/Validator.test.ts
@@ -1,8 +1,8 @@
-import Validator from "../../../src/background/settings/Validator";
+import { Validator } from "../../../src/background/settings/Validator";
import { createPropertyRegistry } from "../../../src/background/property";
import { OperatorRegistryImpl } from "../../../src/background/operators/OperatorRegistory";
-import CloseTabOperator from "../../../src/background/operators/impls/CloseTabOperator";
-import DuplicateTabOperator from "../../../src/background/operators/impls/DuplicateTabOperator";
+import { CloseTabOperator } from "../../../src/background/operators/impls/CloseTabOperator";
+import { DuplicateTabOperator } from "../../../src/background/operators/impls/DuplicateTabOperator";
import { Keymaps } from "../../../src/shared/keymaps";
import { Search } from "../../../src/shared/search";
import { describe, test, expect } from "vitest";
diff --git a/test/background/usecases/AddonEnabledUseCase.test.ts b/test/background/usecases/AddonEnabledUseCase.test.ts
index 1fcbf79f..4ca5f210 100644
--- a/test/background/usecases/AddonEnabledUseCase.test.ts
+++ b/test/background/usecases/AddonEnabledUseCase.test.ts
@@ -1,6 +1,6 @@
-import AddonEnabledUseCase from "../../../src/background/usecases/AddonEnabledUseCase";
-import MockAddonEnabledRepository from "../mock/MockAddonEnabledRepository";
-import MockToolbarPresenter from "../mock/MockToolbarPresenter";
+import { AddonEnabledUseCase } from "../../../src/background/usecases/AddonEnabledUseCase";
+import { MockAddonEnabledRepository } from "../mock/MockAddonEnabledRepository";
+import { MockToolbarPresenter } from "../mock/MockToolbarPresenter";
import { describe, it, vi, expect } from "vitest";
describe("AddonEnabledUseCase", () => {
diff --git a/test/background/usecases/FindUseCase.test.ts b/test/background/usecases/FindUseCase.test.ts
index bc83f3f7..1ac1efc9 100644
--- a/test/background/usecases/FindUseCase.test.ts
+++ b/test/background/usecases/FindUseCase.test.ts
@@ -1,10 +1,10 @@
-import MockFindClient from "../mock/MockFindClient";
-import MockFindHistoryRepository from "../mock/MockFindHistoryRepository";
-import MockFindRepository from "../mock/MockFindRepository";
-import MockConsoleClient from "../mock/MockConsoleClient";
-import MockReadyFrameRepository from "../mock/MockReadyFrameRepository";
-import MockPropertySettings from "../mock/MockPropertySettings";
-import FindUseCase from "../../../src/background/usecases/FindUseCase";
+import { MockFindClient } from "../mock/MockFindClient";
+import { MockFindHistoryRepository } from "../mock/MockFindHistoryRepository";
+import { MockFindRepository } from "../mock/MockFindRepository";
+import { MockConsoleClient } from "../mock/MockConsoleClient";
+import { MockReadyFrameRepository } from "../mock/MockReadyFrameRepository";
+import { MockPropertySettings } from "../mock/MockPropertySettings";
+import { FindUseCase } from "../../../src/background/usecases/FindUseCase";
import { describe, beforeEach, it, vi, expect } from "vitest";
describe("FindUseCase", () => {
diff --git a/test/background/usecases/HintKeyUseCase.test.ts b/test/background/usecases/HintKeyUseCase.test.ts
index dc9ba348..6be171af 100644
--- a/test/background/usecases/HintKeyUseCase.test.ts
+++ b/test/background/usecases/HintKeyUseCase.test.ts
@@ -1,7 +1,7 @@
-import HintKeyUseCaes from "../../../src/background/usecases/HintKeyUseCase";
-import MockHintClient from "../mock/MockHintClient";
-import MockHintRepository from "../mock/MockHintRepository";
-import MockHintActionFactory from "../mock/MockHintActionFactory";
+import { HintKeyUseCase } from "../../../src/background/usecases/HintKeyUseCase";
+import { MockHintClient } from "../mock/MockHintClient";
+import { MockHintRepository } from "../mock/MockHintRepository";
+import { MockHintActionFactory } from "../mock/MockHintActionFactory";
import type { HintAction } from "../../../src/background/hint/types";
import { describe, beforeEach, it, vi, expect } from "vitest";
@@ -17,12 +17,12 @@ class MockHintAction implements HintAction {
}
}
-describe("HintKeyUseCaes", () => {
+describe("HintKeyUseCase", () => {
const hintClient = new MockHintClient();
const hintRepository = new MockHintRepository();
const hintActionFactory = new MockHintActionFactory();
const mockAction = new MockHintAction();
- const sut = new HintKeyUseCaes(hintClient, hintRepository, hintActionFactory);
+ const sut = new HintKeyUseCase(hintClient, hintRepository, hintActionFactory);
const mockPushKey = vi.spyOn(hintRepository, "pushKey").mockResolvedValue();
const mockPopKey = vi.spyOn(hintRepository, "popKey").mockResolvedValue();
diff --git a/test/background/usecases/HintModeUseCase.test.ts b/test/background/usecases/HintModeUseCase.test.ts
index f148f86b..4ee5cc88 100644
--- a/test/background/usecases/HintModeUseCase.test.ts
+++ b/test/background/usecases/HintModeUseCase.test.ts
@@ -1,20 +1,20 @@
-import HintModeUseCaes from "../../../src/background/usecases/HintModeUseCase";
-import MockHintClient from "../mock/MockHintClient";
-import MockTopFrameClient from "../mock/MockTopFrameClient";
-import MockReadyFrameRepository from "../mock/MockReadyFrameRepository";
-import MockPropertySettings from "../mock/MockPropertySettings";
-import MockHintRepository from "../mock/MockHintRepository";
-import MockHintActionFactory from "../mock/MockHintActionFactory";
+import { HintModeUseCase } from "../../../src/background/usecases/HintModeUseCase";
+import { MockHintClient } from "../mock/MockHintClient";
+import { MockTopFrameClient } from "../mock/MockTopFrameClient";
+import { MockReadyFrameRepository } from "../mock/MockReadyFrameRepository";
+import { MockPropertySettings } from "../mock/MockPropertySettings";
+import { MockHintRepository } from "../mock/MockHintRepository";
+import { MockHintActionFactory } from "../mock/MockHintActionFactory";
import { describe, it, vi, expect } from "vitest";
-describe("HintModeUseCaes", () => {
+describe("HintModeUseCase", () => {
const topFrameClient = new MockTopFrameClient();
const hintClient = new MockHintClient();
const frameRepository = new MockReadyFrameRepository();
const propertySettings = new MockPropertySettings();
const hintRepository = new MockHintRepository();
const hintActionFactory = new MockHintActionFactory();
- const sut = new HintModeUseCaes(
+ const sut = new HintModeUseCase(
topFrameClient,
hintClient,
frameRepository,
diff --git a/test/background/usecases/HintTagProducer.test.ts b/test/background/usecases/HintTagProducer.test.ts
index 1d836c5c..7622e5cf 100644
--- a/test/background/usecases/HintTagProducer.test.ts
+++ b/test/background/usecases/HintTagProducer.test.ts
@@ -1,4 +1,4 @@
-import HintTagProducer from "../../../src/background/usecases/HintTagProducer";
+import { HintTagProducer } from "../../../src/background/usecases/HintTagProducer";
import { describe, it, expect } from "vitest";
describe("HintTagProducer", () => {
diff --git a/test/background/usecases/MarkHelper.test.ts b/test/background/usecases/MarkHelper.test.ts
index cf2166f8..ecb421b1 100644
--- a/test/background/usecases/MarkHelper.test.ts
+++ b/test/background/usecases/MarkHelper.test.ts
@@ -1,4 +1,4 @@
-import MarkHelper from "../../../src/background/usecases/MarkHelper";
+import { MarkHelper } from "../../../src/background/usecases/MarkHelper";
import { describe, it, expect } from "vitest";
describe("MarkHelper", () => {
diff --git a/test/background/usecases/MarkJumpUseCase.test.ts b/test/background/usecases/MarkJumpUseCase.test.ts
index b4a437b7..7e11fea3 100644
--- a/test/background/usecases/MarkJumpUseCase.test.ts
+++ b/test/background/usecases/MarkJumpUseCase.test.ts
@@ -1,9 +1,9 @@
-import MarkJumpUseCase from "../../../src/background/usecases/MarkJumpUseCase";
-import MockConsoleClient from "../mock/MockConsoleClient";
-import MockContentMessageClient from "../mock/MockContentMessageClient";
-import MockPropertySettings from "../mock/MockPropertySettings";
-import MockMarkRepository from "../mock/MockMarkRepository";
-import MarkHelper from "../../../src/background/usecases/MarkHelper";
+import { MarkJumpUseCase } from "../../../src/background/usecases/MarkJumpUseCase";
+import { MockConsoleClient } from "../mock/MockConsoleClient";
+import { MockContentMessageClient } from "../mock/MockContentMessageClient";
+import { MockPropertySettings } from "../mock/MockPropertySettings";
+import { MockMarkRepository } from "../mock/MockMarkRepository";
+import { MarkHelper } from "../../../src/background/usecases/MarkHelper";
import { describe, beforeAll, it, vi, expect } from "vitest";
describe("MarkJumpUseCase", () => {
diff --git a/test/background/usecases/MarkSetUseCase.test.ts b/test/background/usecases/MarkSetUseCase.test.ts
index ff99795e..dcabbf36 100644
--- a/test/background/usecases/MarkSetUseCase.test.ts
+++ b/test/background/usecases/MarkSetUseCase.test.ts
@@ -1,9 +1,9 @@
-import MarkSetUseCase from "../../../src/background/usecases/MarkSetUseCase";
-import MockConsoleClient from "../mock/MockConsoleClient";
-import MockContentMessageClient from "../mock/MockContentMessageClient";
-import MockMarkRepository from "../mock/MockMarkRepository";
-import MarkHelper from "../../../src/background/usecases/MarkHelper";
-import defaultTab from "../mock/defaultTab";
+import { MarkSetUseCase } from "../../../src/background/usecases/MarkSetUseCase";
+import { MockConsoleClient } from "../mock/MockConsoleClient";
+import { MockContentMessageClient } from "../mock/MockContentMessageClient";
+import { MockMarkRepository } from "../mock/MockMarkRepository";
+import { MarkHelper } from "../../../src/background/usecases/MarkHelper";
+import { defaultTab } from "../mock/defaultTab";
import { describe, it, vi, expect } from "vitest";
describe("MarkSetUseCase", () => {
diff --git a/test/console/app/reducer.test.ts b/test/console/app/reducer.test.ts
index c4ad30bc..b4e6c371 100644
--- a/test/console/app/reducer.test.ts
+++ b/test/console/app/reducer.test.ts
@@ -1,4 +1,5 @@
-import reducer, {
+import {
+ reducer,
defaultState,
type State,
} from "../../../src/console/app/recuer";
diff --git a/test/console/completion/components/CompletionItem.test.tsx b/test/console/completion/components/CompletionItem.test.tsx
index cf43045e..0ee6ee8c 100644
--- a/test/console/completion/components/CompletionItem.test.tsx
+++ b/test/console/completion/components/CompletionItem.test.tsx
@@ -1,6 +1,6 @@
import React from "react";
import ReactTestRenderer from "react-test-renderer";
-import CompletionItem from "../../../../src/console/completion/components/CompletionItem";
+import { CompletionItem } from "../../../../src/console/completion/components/CompletionItem";
import { describe, it, expect } from "vitest";
describe("console/components/console/completion/CompletionItem", () => {
diff --git a/test/console/completion/components/CompletionList.test.tsx b/test/console/completion/components/CompletionList.test.tsx
index 7849d866..5f13382b 100644
--- a/test/console/completion/components/CompletionList.test.tsx
+++ b/test/console/completion/components/CompletionList.test.tsx
@@ -1,8 +1,8 @@
import React from "react";
import ReactTestRenderer from "react-test-renderer";
-import CompletionList from "../../../../src/console/completion/components/CompletionList";
-import CompletionTitle from "../../../../src/console/completion/components/CompletionTitle";
-import CompletionItem from "../../../../src/console/completion/components/CompletionItem";
+import { CompletionList } from "../../../../src/console/completion/components/CompletionList";
+import { CompletionTitle } from "../../../../src/console/completion/components/CompletionTitle";
+import { CompletionItem } from "../../../../src/console/completion/components/CompletionItem";
import { describe, it, expect } from "vitest";
describe("CompletionList", () => {
diff --git a/test/console/completion/components/CompletionTitle.test.tsx b/test/console/completion/components/CompletionTitle.test.tsx
index b86243d3..ab49c569 100644
--- a/test/console/completion/components/CompletionTitle.test.tsx
+++ b/test/console/completion/components/CompletionTitle.test.tsx
@@ -1,6 +1,6 @@
import React from "react";
import ReactTestRenderer from "react-test-renderer";
-import CompletionTitle from "../../../../src/console/completion/components/CompletionTitle";
+import { CompletionTitle } from "../../../../src/console/completion/components/CompletionTitle";
import { describe, it, expect } from "vitest";
describe("console/components/console/completion/CompletionTitle", () => {
diff --git a/test/console/completion/hooks/useCompletionKeyBinds.test.ts b/test/console/completion/hooks/useCompletionKeyBinds.test.ts
index 549d3333..c12a69f8 100644
--- a/test/console/completion/hooks/useCompletionKeyBinds.test.ts
+++ b/test/console/completion/hooks/useCompletionKeyBinds.test.ts
@@ -1,6 +1,6 @@
import type React from "react";
import { renderHook, act } from "@testing-library/react-hooks";
-import useCompletionKeyBinds from "../../../../src/console/completion/hooks/useCompletionKeyBinds";
+import { useCompletionKeyBinds } from "../../../../src/console/completion/hooks/useCompletionKeyBinds";
import { describe, beforeEach, it, vi, expect } from "vitest";
const mockKeyEvent = ({
diff --git a/test/console/completion/hooks/useCursor.test.ts b/test/console/completion/hooks/useCursor.test.ts
index c3af965e..0dee54fb 100644
--- a/test/console/completion/hooks/useCursor.test.ts
+++ b/test/console/completion/hooks/useCursor.test.ts
@@ -1,5 +1,5 @@
import { renderHook, act } from "@testing-library/react-hooks";
-import useCursor from "../../../../src/console/completion/hooks/useCursor";
+import { useCursor } from "../../../../src/console/completion/hooks/useCursor";
import { describe, it, expect } from "vitest";
describe("useCursor", () => {
diff --git a/test/console/components/ErrorMessage.test.tsx b/test/console/components/ErrorMessage.test.tsx
index e7411768..98fbdb31 100644
--- a/test/console/components/ErrorMessage.test.tsx
+++ b/test/console/components/ErrorMessage.test.tsx
@@ -4,7 +4,7 @@
import React from "react";
import ReactTestRenderer from "react-test-renderer";
-import ErrorMessage from "../../../src/console/components/ErrorMessage";
+import { ErrorMessage } from "../../../src/console/components/ErrorMessage";
import { describe, it, expect } from "vitest";
describe("console/components/console/completion/ErrorMessage", () => {
diff --git a/test/console/components/InfoMessage.test.tsx b/test/console/components/InfoMessage.test.tsx
index 607505d7..6a59f0e9 100644
--- a/test/console/components/InfoMessage.test.tsx
+++ b/test/console/components/InfoMessage.test.tsx
@@ -4,7 +4,7 @@
import React from "react";
import ReactTestRenderer from "react-test-renderer";
-import InfoMessage from "../../../src/console/components/InfoMessage";
+import { InfoMessage } from "../../../src/console/components/InfoMessage";
import { describe, it, expect } from "vitest";
describe("console/components/console/completion/InfoMessage", () => {
diff --git a/test/content/InputDriver.test.ts b/test/content/InputDriver.test.ts
index c9d83d73..d46b8392 100644
--- a/test/content/InputDriver.test.ts
+++ b/test/content/InputDriver.test.ts
@@ -2,7 +2,8 @@
* @vitest-environment jsdom
*/
-import InputDriver, {
+import {
+ InputDriver,
keyFromKeyboardEvent,
} from "../../src/content/InputDriver";
import type { Key } from "../../src/shared/key";
diff --git a/test/content/domains/KeySequence.test.ts b/test/content/domains/KeySequence.test.ts
index 4560c02a..9cca43c4 100644
--- a/test/content/domains/KeySequence.test.ts
+++ b/test/content/domains/KeySequence.test.ts
@@ -1,4 +1,4 @@
-import KeySequence from "../../../src/content/domains/KeySequence";
+import { KeySequence } from "../../../src/content/domains/KeySequence";
import { fromKeymap, Key } from "../../../src/shared/key";
import { describe, it, expect } from "vitest";
diff --git a/test/content/mock/MockAddonEnabledRepository.ts b/test/content/mock/MockAddonEnabledRepository.ts
index e8f7976f..363e885a 100644
--- a/test/content/mock/MockAddonEnabledRepository.ts
+++ b/test/content/mock/MockAddonEnabledRepository.ts
@@ -1,8 +1,6 @@
import type { AddonEnabledRepository } from "../../../src/content/repositories/AddonEnabledRepository";
-export default class MockAddonEnabledRepository
- implements AddonEnabledRepository
-{
+export class MockAddonEnabledRepository implements AddonEnabledRepository {
constructor(public enabled: boolean) {}
enable(): void {
diff --git a/test/content/mock/MockConsoleFramePresenter.ts b/test/content/mock/MockConsoleFramePresenter.ts
index e494d692..9942c14c 100644
--- a/test/content/mock/MockConsoleFramePresenter.ts
+++ b/test/content/mock/MockConsoleFramePresenter.ts
@@ -1,8 +1,6 @@
import type { ConsoleFramePresenter } from "../../../src/content/presenters/ConsoleFramePresenter";
-export default class MockConsoleFramePresenter
- implements ConsoleFramePresenter
-{
+export class MockConsoleFramePresenter implements ConsoleFramePresenter {
constructor(public attached: boolean) {}
attach(): void {
diff --git a/test/content/mock/MockFocusPresenter.ts b/test/content/mock/MockFocusPresenter.ts
deleted file mode 100644
index 635b786e..00000000
--- a/test/content/mock/MockFocusPresenter.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import type { FocusPresenter } from "../../../src/content/presenters/FocusPresenter";
-
-export default class MockFocusPresenter implements FocusPresenter {
- focusFirstElement(): boolean {
- throw new Error("not implemented");
- }
-}
diff --git a/test/content/mock/MockScrollPresenter.ts b/test/content/mock/MockScrollPresenter.ts
deleted file mode 100644
index e9e4d0a6..00000000
--- a/test/content/mock/MockScrollPresenter.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-import type {
- ScrollPresenter,
- Point,
-} from "../../../src/content/presenters/ScrollPresenter";
-
-export default class MockScrollPresenter implements ScrollPresenter {
- private readonly pos: Point;
-
- constructor(initX = 0, initY = 0) {
- this.pos = { x: initX, y: initY };
- }
-
- getScroll(): Point {
- return this.pos;
- }
-
- scrollVertically(amount: number, _smooth: boolean): void {
- this.pos.y += amount;
- }
-
- scrollHorizonally(amount: number, _smooth: boolean): void {
- this.pos.x += amount;
- }
-
- scrollPages(amount: number, _smooth: boolean): void {
- this.pos.x += amount;
- }
-
- scrollTo(x: number, y: number, _smooth: boolean): void {
- this.pos.x = x;
- this.pos.y = y;
- }
-
- scrollToTop(_smooth: boolean): void {
- this.pos.y = 0;
- }
-
- scrollToBottom(_smooth: boolean): void {
- this.pos.y = Infinity;
- }
-
- scrollToHome(_smooth: boolean): void {
- this.pos.x = 0;
- }
-
- scrollToEnd(_smooth: boolean): void {
- this.pos.x = Infinity;
- }
-}
diff --git a/test/content/mock/MockSettingRepository.ts b/test/content/mock/MockSettingRepository.ts
index 1320bcf8..80826274 100644
--- a/test/content/mock/MockSettingRepository.ts
+++ b/test/content/mock/MockSettingRepository.ts
@@ -7,7 +7,7 @@ import type { Properties } from "../../../src/shared/properties";
import type { Search } from "../../../src/shared/search";
import type { ComponentName, CSS } from "../../../src/shared/styles";
-export default class MockSettingRepository implements SettingRepository {
+export class MockSettingRepository implements SettingRepository {
private value: Settings;
constructor(initValue: Settings = defaultSettings) {
diff --git a/test/content/presenters/HTMLElementLocator.test.ts b/test/content/presenters/HTMLElementLocator.test.ts
index ccb70bfc..26fc0ed2 100644
--- a/test/content/presenters/HTMLElementLocator.test.ts
+++ b/test/content/presenters/HTMLElementLocator.test.ts
@@ -2,7 +2,7 @@
* @vitest-environment jsdom
*/
-import HTMLElementLocator from "../../../src/content/presenters/HTMLElementLocator";
+import { HTMLElementLocator } from "../../../src/content/presenters/HTMLElementLocator";
import { describe, beforeEach, test, expect } from "vitest";
describe("HTMLElementLocator", () => {
diff --git a/test/content/presenters/Hint.test.ts b/test/content/presenters/Hint.test.ts
index 81450feb..fe877336 100644
--- a/test/content/presenters/Hint.test.ts
+++ b/test/content/presenters/Hint.test.ts
@@ -2,7 +2,7 @@
* @vitest-environment jsdom
*/
-import Hint from "../../../src/content/presenters/Hint";
+import { Hint } from "../../../src/content/presenters/Hint";
import { describe, beforeEach, it, expect } from "vitest";
describe("Hint", () => {
diff --git a/test/content/presenters/HintPresenter.test.ts b/test/content/presenters/HintPresenter.test.ts
index 584019e0..55c57bd1 100644
--- a/test/content/presenters/HintPresenter.test.ts
+++ b/test/content/presenters/HintPresenter.test.ts
@@ -3,7 +3,7 @@
*/
import { HintPresenterImpl } from "../../../src/content/presenters/HintPresenter";
-import MockSettingsRepository from "../mock/MockSettingRepository";
+import { MockSettingRepository } from "../mock/MockSettingRepository";
import { describe, beforeEach, test, expect } from "vitest";
describe("HintPresenterImpl", () => {
@@ -30,7 +30,7 @@ describe("HintPresenterImpl", () => {
});
test("should assign tags to hints and clear them", () => {
- const settingsRepository = new MockSettingsRepository();
+ const settingsRepository = new MockSettingRepository();
const sut = new HintPresenterImpl(settingsRepository);
const viewSize = { width: 100, height: 100 };
const framePosition = { x: 0, y: 0 };
diff --git a/test/content/usecases/AddonEnabledUseCase.test.ts b/test/content/usecases/AddonEnabledUseCase.test.ts
index a99d6ef5..42773bcb 100644
--- a/test/content/usecases/AddonEnabledUseCase.test.ts
+++ b/test/content/usecases/AddonEnabledUseCase.test.ts
@@ -1,6 +1,6 @@
-import AddonEnabledUseCase from "../../../src/content/usecases/AddonEnabledUseCase";
-import MockAddonEnabledRepository from "../mock/MockAddonEnabledRepository";
-import MockConsoleFramePresenter from "../mock/MockConsoleFramePresenter";
+import { AddonEnabledUseCase } from "../../../src/content/usecases/AddonEnabledUseCase";
+import { MockAddonEnabledRepository } from "../mock/MockAddonEnabledRepository";
+import { MockConsoleFramePresenter } from "../mock/MockConsoleFramePresenter";
import { describe, it, expect } from "vitest";
describe("AddonEnabledUseCase", () => {
diff --git a/test/content/usecases/KeymapUseCase.test.ts b/test/content/usecases/KeymapUseCase.test.ts
index 790c8dd0..7d68a532 100644
--- a/test/content/usecases/KeymapUseCase.test.ts
+++ b/test/content/usecases/KeymapUseCase.test.ts
@@ -1,10 +1,10 @@
-import KeymapUseCase from "../../../src/content/usecases/KeymapUseCase";
+import { KeymapUseCase } from "../../../src/content/usecases/KeymapUseCase";
import { KeymapRepositoryImpl } from "../../../src/content/repositories/KeymapRepository";
import { fromKeymap } from "../../../src/shared/key";
import { deserialize } from "../../../src/settings";
import type { AddressRepository } from "../../../src/content/repositories/AddressRepository";
-import MockAddonEnabledRepository from "../mock/MockAddonEnabledRepository";
-import MockSettingRepository from "../mock/MockSettingRepository";
+import { MockAddonEnabledRepository } from "../mock/MockAddonEnabledRepository";
+import { MockSettingRepository } from "../mock/MockSettingRepository";
import { describe, beforeEach, it, expect } from "vitest";
class MockAddressRepository implements AddressRepository {
diff --git a/test/content/usecases/OperationUseCase.test.ts b/test/content/usecases/OperationUseCase.test.ts
index b7beb756..6b155b28 100644
--- a/test/content/usecases/OperationUseCase.test.ts
+++ b/test/content/usecases/OperationUseCase.test.ts
@@ -1,4 +1,4 @@
-import OperationUseCase from "../../../src/content/usecases/OperationUseCase";
+import { OperationUseCase } from "../../../src/content/usecases/OperationUseCase";
import type { OperationClient } from "../../../src/content/client/OperationClient";
import { describe, beforeEach, it, vi, expect } from "vitest";
diff --git a/test/messaging/handler/Receiver.test.ts b/test/messaging/handler/Receiver.test.ts
index 96d5693c..b98bad50 100644
--- a/test/messaging/handler/Receiver.test.ts
+++ b/test/messaging/handler/Receiver.test.ts
@@ -1,4 +1,4 @@
-import Receiver from "../../../src/messaging/handler/Receiver";
+import { Receiver } from "../../../src/messaging/handler/Receiver";
import { describe, vi, test, expect } from "vitest";
type Schema = {
diff --git a/test/messaging/handler/ReceiverWithContext.test.ts b/test/messaging/handler/ReceiverWithContext.test.ts
index b9d498c3..c29eda80 100644
--- a/test/messaging/handler/ReceiverWithContext.test.ts
+++ b/test/messaging/handler/ReceiverWithContext.test.ts
@@ -1,4 +1,4 @@
-import ReceiverWithContext from "../../../src/messaging/handler/ReceiverWithContext";
+import { ReceiverWithContext } from "../../../src/messaging/handler/ReceiverWithContext";
import { describe, vi, test, expect } from "vitest";
type Schema = {
diff --git a/test/messaging/handler/Sender.test.ts b/test/messaging/handler/Sender.test.ts
index bcfbd798..b34ca0cc 100644
--- a/test/messaging/handler/Sender.test.ts
+++ b/test/messaging/handler/Sender.test.ts
@@ -1,4 +1,4 @@
-import Sender from "../../../src/messaging/handler/Sender";
+import { Sender } from "../../../src/messaging/handler/Sender";
import { describe, vi, test, expect } from "vitest";
type Schema = {
diff --git a/vitest.config.ts b/vitest.config.ts
index 9d27d9f7..d0d28f50 100644
--- a/vitest.config.ts
+++ b/vitest.config.ts
@@ -1,5 +1,6 @@
import { defineConfig } from "vitest/config";
+// eslint-disable-next-line no-restricted-exports
export default defineConfig({
test: {
include: ["./test/**/*.test.ts"],