chore: Enforce import order via @ianvs/prettier-plugin-sort-imports (#2542)
This commit is contained in:
committed by
dermotduffy
parent
95f35bd326
commit
a96dc2e863
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { isAutoHidden, resolveAutoHideState } from '../../src/components-lib/auto-hide';
|
||||
|
||||
describe('isAutoHidden', () => {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { ReactiveControllerHost } from 'lit';
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import { CachedValueController } from '../../src/components-lib/cached-value-controller';
|
||||
|
||||
// @vitest-environment jsdom
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { assert, describe, expect, it, vi } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import {
|
||||
ViewManagerEpoch,
|
||||
ViewManagerInterface,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { LitElement } from 'lit';
|
||||
import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import {
|
||||
GalleryColumnCountRoundMethod,
|
||||
GalleryCoreController,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { IconController } from '../../src/components-lib/icon-controller';
|
||||
import { createHASS, createStateEntity } from '../test-utils';
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { KeyAssignerController } from '../../src/components-lib/key-assigner-controller';
|
||||
import { createLitElement } from '../test-utils';
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
it,
|
||||
vi,
|
||||
} from 'vitest';
|
||||
|
||||
import { LazyLoadController } from '../../src/components-lib/lazy-load-controller';
|
||||
import { LazyUnloadCondition } from '../../src/config/schema/common/media-actions';
|
||||
import {
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import { MicrophoneManager } from '../../../src/card-controller/microphone-manager';
|
||||
import { MicrophoneActionsController } from '../../../src/components-lib/live/microphone-actions-controller';
|
||||
import {
|
||||
IntersectionObserverMock,
|
||||
callIntersectionHandler,
|
||||
callVisibilityHandler,
|
||||
createParent,
|
||||
getMockIntersectionObserver,
|
||||
IntersectionObserverMock,
|
||||
} from '../../test-utils';
|
||||
|
||||
const createMicrophoneManager = (): MicrophoneManager => {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { expect, it, vi } from 'vitest';
|
||||
|
||||
import { dispatchLiveErrorEvent } from '../../../../src/components-lib/live/utils/dispatch-live-error';
|
||||
|
||||
// @vitest-environment jsdom
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { getTechnologyForVideoRTC } from '../../../../src/components-lib/live/utils/get-technology-for-video-rtc';
|
||||
import { VideoRTC } from '../../../../src/components/live/providers/go2rtc/video-rtc';
|
||||
import { createLitElement } from '../../../test-utils';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import { MicrophoneState } from '../../src/card-controller/types';
|
||||
import {
|
||||
MediaActionsController,
|
||||
@@ -7,13 +8,13 @@ import {
|
||||
} from '../../src/components-lib/media-actions-controller';
|
||||
import { MediaPlayerController, MediaPlayerElement } from '../../src/types';
|
||||
import {
|
||||
IntersectionObserverMock,
|
||||
MutationObserverMock,
|
||||
callIntersectionHandler,
|
||||
callMutationHandler,
|
||||
callVisibilityHandler,
|
||||
createParent,
|
||||
flushPromises,
|
||||
IntersectionObserverMock,
|
||||
MutationObserverMock,
|
||||
} from '../test-utils';
|
||||
import { createTestSlideNodes } from '../utils/embla/test-utils';
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { MediaDimensionsContainerController } from '../../src/components-lib/media-dimensions-container-controller';
|
||||
import { CameraDimensionsConfig, Rotation } from '../../src/config/schema/cameras';
|
||||
import { MediaLoadedInfo } from '../../src/types';
|
||||
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
vi,
|
||||
} from 'vitest';
|
||||
import { mock, MockProxy } from 'vitest-mock-extended';
|
||||
|
||||
import { Capabilities } from '../../src/camera-manager/capabilities';
|
||||
import {
|
||||
EventQuery,
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
import Masonry from 'masonry-layout';
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import {
|
||||
ExtendedMasonry,
|
||||
MediaGridConstructorOptions,
|
||||
MediaGridController,
|
||||
} from '../../src/components-lib/media-grid-controller';
|
||||
import {
|
||||
MutationObserverMock,
|
||||
ResizeObserverMock,
|
||||
createSlot,
|
||||
createSlotHost,
|
||||
MutationObserverMock,
|
||||
ResizeObserverMock,
|
||||
} from '../test-utils';
|
||||
|
||||
vi.mock('lodash-es', async () => ({
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { MediaHeightController } from '../../src/components-lib/media-height-controller';
|
||||
import {
|
||||
callMutationHandler,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { MediaLoadedInfoSinkController } from '../../src/components-lib/media-loaded-info-sink-controller';
|
||||
import {
|
||||
createLitElement,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import { MediaLoadedInfoSourceController } from '../../src/components-lib/media-loaded-info-source-controller';
|
||||
import { MediaPlayerController } from '../../src/types';
|
||||
import { createLitElement, createMediaLoadedInfo } from '../test-utils';
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import { ImageMediaPlayerController } from '../../../src/components-lib/media-player/image';
|
||||
import { createLitElement } from '../../test-utils';
|
||||
import { screenshotImage } from '../../../src/utils/screenshot';
|
||||
import { createLitElement } from '../../test-utils';
|
||||
|
||||
vi.mock('../../../src/utils/screenshot.js');
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import JSMpeg from '@cycjimmy/jsmpeg-player';
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import { JSMPEGMediaPlayerController } from '../../../src/components-lib/media-player/jsmpeg';
|
||||
import { createLitElement } from '../../test-utils';
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import { CachedValueController } from '../../../src/components-lib/cached-value-controller';
|
||||
import { ImageMediaPlayerController } from '../../../src/components-lib/media-player/image';
|
||||
import { UpdatingImageMediaPlayerController } from '../../../src/components-lib/media-player/updating-image';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import { VideoMediaPlayerController } from '../../../src/components-lib/media-player/video';
|
||||
import {
|
||||
hideMediaControlsTemporarily,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { format } from 'date-fns';
|
||||
import { afterEach, assert, describe, expect, it, vi } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import { CameraManager } from '../../../src/camera-manager/manager';
|
||||
import { ActionFactory } from '../../../src/card-controller/actions/factory';
|
||||
import { CardController } from '../../../src/card-controller/controller';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import { Capabilities } from '../../src/camera-manager/capabilities.js';
|
||||
import { CameraManager } from '../../src/camera-manager/manager.js';
|
||||
import { CameraManagerCameraMetadata } from '../../src/camera-manager/types.js';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import type { LockManager } from '../../src/card-controller/lock/manager';
|
||||
import type { LockManagerEpoch } from '../../src/card-controller/lock/types';
|
||||
import { MenuController } from '../../src/components-lib/menu-controller.js';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { NonEmptyTuple } from 'type-fest';
|
||||
import { assert, describe, expect, it, vi } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import { CameraManager } from '../../src/camera-manager/manager';
|
||||
import { EventQuery, QueryType } from '../../src/camera-manager/types';
|
||||
import { FoldersManager } from '../../src/card-controller/folders/manager';
|
||||
@@ -8,8 +9,8 @@ import { FolderPathComponent } from '../../src/card-controller/folders/types';
|
||||
import { ViewManagerEpoch, ViewModifier } from '../../src/card-controller/view/types';
|
||||
import {
|
||||
FolderNavigationParamaters,
|
||||
MediaNavigationParamaters,
|
||||
getUpFolderItem,
|
||||
MediaNavigationParamaters,
|
||||
navigateToFolder,
|
||||
navigateToMedia,
|
||||
navigateUp,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// @vitest-environment jsdom
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { dispatchActionExecutionRequest } from '../../../src/card-controller/actions/utils/execution-request';
|
||||
import { handleControlAction } from '../../../src/components-lib/notification/action';
|
||||
import { NotificationControl } from '../../../src/config/schema/actions/types';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { dataToContext } from '../../../src/components-lib/notification/data-to-context';
|
||||
|
||||
describe('dataToContext', () => {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { assert, describe, expect, it } from 'vitest';
|
||||
|
||||
import {
|
||||
createNotificationFromError,
|
||||
createNotificationFromText,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { summarizeNotification } from '../../../src/components-lib/notification/summarize';
|
||||
import { Notification } from '../../../src/config/schema/actions/types';
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { createGesture } from '@use-gesture/vanilla';
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { dispatchActionExecutionRequest } from '../../../src/card-controller/actions/utils/execution-request.js';
|
||||
import { PTZDragController } from '../../../src/components-lib/ptz/drag-controller';
|
||||
import {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { Capabilities } from '../../../src/camera-manager/capabilities';
|
||||
import { PTZController } from '../../../src/components-lib/ptz/ptz-controller';
|
||||
import { PTZControlAction } from '../../../src/config/schema/actions/custom/ptz';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { ReactiveControllerHost } from 'lit';
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import { SignedURLController } from '../../src/components-lib/signed-url-controller';
|
||||
import { homeAssistantGetSignedURLIfNecessary } from '../../src/ha/sign-path';
|
||||
import { createProxiedEndpointIfNecessary } from '../../src/ha/web-proxy';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { afterAll, beforeAll, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { StatusBarController } from '../../src/components-lib/status-bar-controller';
|
||||
import {
|
||||
StatusBarConfig,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { format } from 'date-fns';
|
||||
import { assert, describe, expect, it } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import { CameraManager } from '../../../../src/camera-manager/manager';
|
||||
import { ThumbnailFeatureController } from '../../../../src/components-lib/thumbnail/feature/controller';
|
||||
import { ViewFolder } from '../../../../src/view/item';
|
||||
|
||||
@@ -13,6 +13,7 @@ import {
|
||||
vi,
|
||||
} from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import { CameraManager } from '../../../src/camera-manager/manager';
|
||||
import {
|
||||
Engine,
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { VisibilityObserver } from '../../src/components-lib/visibility-observer';
|
||||
import {
|
||||
IntersectionObserverMock,
|
||||
callIntersectionHandler,
|
||||
callVisibilityHandler,
|
||||
createParent,
|
||||
getMockIntersectionObserver,
|
||||
IntersectionObserverMock,
|
||||
} from '../test-utils';
|
||||
|
||||
// @vitest-environment jsdom
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import Panzoom, { PanzoomEventDetail, PanzoomObject } from '@dermotduffy/panzoom';
|
||||
import { beforeAll, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { mock, mockClear } from 'vitest-mock-extended';
|
||||
|
||||
import { ZoomController } from '../../../src/components-lib/zoom/zoom-controller';
|
||||
import {
|
||||
ResizeObserverMock,
|
||||
createTouch,
|
||||
createTouchEvent,
|
||||
requestAnimationFrameMock,
|
||||
ResizeObserverMock,
|
||||
} from '../../test-utils';
|
||||
|
||||
vi.mock('@dermotduffy/panzoom');
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import { MergeContextViewModifier } from '../../../src/card-controller/view/modifiers/merge-context';
|
||||
import { ViewManager } from '../../../src/card-controller/view/view-manager';
|
||||
import {
|
||||
|
||||
Reference in New Issue
Block a user