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, vi } from 'vitest';
|
||||
|
||||
import { onAbort } from '../../src/utils/abort-signal';
|
||||
|
||||
describe('onAbort', () => {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import { INTERNAL_CALLBACK_ACTION } from '../../src/config/schema/actions/custom/internal.js';
|
||||
import { ActionConfig } from '../../src/config/schema/actions/types.js';
|
||||
import {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import { hasPopOutAnimationEnded } from '../../src/utils/animation.js';
|
||||
|
||||
describe('hasPopOutAnimationEnded', () => {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import {
|
||||
addAudioTracksMuteStateListener,
|
||||
AudioProperties,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { afterAll, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { AdvancedCameraCardError } from '../../src/types.js';
|
||||
import {
|
||||
allPromises,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { getCameraID } from '../../src/utils/camera.js';
|
||||
import { createCameraConfig } from '../test-utils.js';
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { isBeingCasted } from '../../src/utils/casting.js';
|
||||
|
||||
describe('isBeingCasted', () => {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import {
|
||||
isCompanionApp,
|
||||
isAndroidCompanionApp,
|
||||
isCompanionApp,
|
||||
isIOSCompanionApp,
|
||||
} from '../../src/utils/companion';
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { KeyedSubscriptionManager } from '../../../src/utils/concurrency/keyed-subscription-manager';
|
||||
|
||||
interface TestRequest {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { SerialRunner } from '../../../src/utils/concurrency/serial-runner';
|
||||
|
||||
describe('SerialRunner', () => {
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { afterAll, beforeAll, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import {
|
||||
AdvancedCameraCardHTMLVideoElement,
|
||||
MEDIA_LOAD_CONTROLS_HIDE_SECONDS,
|
||||
hideMediaControlsTemporarily,
|
||||
MEDIA_LOAD_CONTROLS_HIDE_SECONDS,
|
||||
setControlsOnVideo,
|
||||
} from '../../src/utils/controls.js';
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { afterAll, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { log } from '../../src/utils/debug.js';
|
||||
|
||||
describe('log', () => {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { HassConfig } from 'home-assistant-js-websocket';
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import { DeviceRegistryManager } from '../../src/ha/registry/device';
|
||||
import { homeAssistantWSRequest } from '../../src/ha/ws-request';
|
||||
import { getLanguage } from '../../src/localize/localize';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import { downloadURL } from '../../src/utils/download';
|
||||
|
||||
// @vitest-environment jsdom
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import EmblaCarousel, { EmblaCarouselType } from 'embla-carousel';
|
||||
import { MockedObject, beforeAll, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { beforeAll, beforeEach, describe, expect, it, MockedObject, vi } from 'vitest';
|
||||
|
||||
import { CarouselController } from '../../../src/utils/embla/carousel-controller';
|
||||
import {
|
||||
MutationObserverMock,
|
||||
callMutationHandler,
|
||||
createParent,
|
||||
createSlot,
|
||||
createSlotHost,
|
||||
MutationObserverMock,
|
||||
} from '../../test-utils';
|
||||
import {
|
||||
callEmblaHandler,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { AdvancedCameraCardError } from '../../src/types';
|
||||
import { getContextFromError } from '../../src/utils/error-context';
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { assert, describe, expect, it } from 'vitest';
|
||||
|
||||
import { isAncestorInEventPath } from '../../src/utils/event-ancestor';
|
||||
|
||||
// @vitest-environment jsdom
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { ExponentialBackoff } from '../../src/utils/exponential-backoff';
|
||||
|
||||
describe('ExponentialBackoff', () => {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { findBestMediaTimeIndex } from '../../src/utils/find-best-media-time-index';
|
||||
import { ViewFolder } from '../../src/view/item';
|
||||
import { TestViewMedia } from '../test-utils';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { fireAdvancedCameraCardEvent } from '../../src/utils/fire-advanced-camera-card-event.js';
|
||||
|
||||
// @vitest-environment jsdom
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { getFolderID } from '../../src/utils/folder';
|
||||
|
||||
describe('getFolderID', () => {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { Initializer } from '../../src/utils/initializer/initializer';
|
||||
|
||||
describe('Initializer', () => {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { isActionAllowedBasedOnInteractionState } from '../../src/utils/interaction-mode';
|
||||
|
||||
describe('isActionAllowedBasedOnInteractionState', () => {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import * as go2rtcAudio from '../../src/camera-manager/utils/go2rtc/audio';
|
||||
import {
|
||||
getResolvedLiveProvider,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import { ViewItemManager } from '../../src/card-controller/view/item-manager';
|
||||
import { RemoveContextViewModifier } from '../../src/card-controller/view/modifiers/remove-context';
|
||||
import { ViewManagerEpoch } from '../../src/card-controller/view/types';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import { MediaLoadedCapabilities, MediaPlayer } from '../../src/types';
|
||||
import {
|
||||
createMediaLoadedInfo,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { updateElementStyleFromMediaLayoutConfig } from '../../src/utils/media-layout.js';
|
||||
|
||||
// @vitest-environment jsdom
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { classifyMimeType } from '../../src/utils/mime-type';
|
||||
|
||||
describe('classifyMimeType', () => {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { dispatchDismissNotificationEvent } from '../../src/utils/notification';
|
||||
|
||||
// @vitest-environment jsdom
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { Capabilities } from '../../src/camera-manager/capabilities';
|
||||
import { AdvancedCameraCardView } from '../../src/config/schema/common/const';
|
||||
import { PTZMovementType } from '../../src/types';
|
||||
@@ -8,13 +9,13 @@ import {
|
||||
ptzActionToCapabilityKey,
|
||||
} from '../../src/utils/ptz';
|
||||
import { QueryResults } from '../../src/view/query-results';
|
||||
import { IMAGE_VIEW_TARGET_ID_SENTINEL } from '../../src/view/target-id';
|
||||
import * as targetId from '../../src/view/target-id';
|
||||
import { IMAGE_VIEW_TARGET_ID_SENTINEL } from '../../src/view/target-id';
|
||||
import {
|
||||
TestViewMedia,
|
||||
createCameraManager,
|
||||
createStore,
|
||||
createView,
|
||||
TestViewMedia,
|
||||
} from '../test-utils';
|
||||
|
||||
describe('getPTZTarget', () => {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { regexpExtract } from '../../src/utils/regexp-extract';
|
||||
|
||||
describe('regexpExtract', () => {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { RetryTimer } from '../../src/utils/retry-timer';
|
||||
|
||||
// @vitest-environment jsdom
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { afterAll, afterEach, beforeAll, describe, expect, it, vi } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import {
|
||||
generateScreenshotFilename,
|
||||
screenshotImage,
|
||||
@@ -7,7 +8,7 @@ import {
|
||||
} from '../../src/utils/screenshot';
|
||||
import { QueryResults } from '../../src/view/query-results';
|
||||
import { View } from '../../src/view/view';
|
||||
import { TestViewMedia, createView } from '../test-utils';
|
||||
import { createView, TestViewMedia } from '../test-utils';
|
||||
|
||||
// @vitest-environment jsdom
|
||||
describe('screenshotVideo', () => {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { compute as computeScroll } from 'compute-scroll-into-view';
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { scrollIntoView } from '../../src/utils/scroll';
|
||||
|
||||
vi.mock('compute-scroll-into-view');
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { sleep } from '../../src/utils/sleep';
|
||||
|
||||
describe('sleep', () => {
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Task } from '@lit-labs/task';
|
||||
import { html, render, TemplateResult } from 'lit';
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import { renderProgressIndicator } from '../../src/components/progress-indicator';
|
||||
import { renderTask } from '../../src/utils/task';
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { getTextDirection } from '../../src/utils/text-direction.js';
|
||||
|
||||
// @vitest-environment jsdom
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Task } from '@lit-labs/task';
|
||||
import { ReactiveControllerHost } from '@lit/reactive-element';
|
||||
import { afterEach, assert, describe, expect, it, vi } from 'vitest';
|
||||
import { mock } from 'vitest-mock-extended';
|
||||
|
||||
import { createFetchThumbnailTask } from '../../src/utils/thumbnail';
|
||||
import { createHASS, flushPromises } from '../test-utils';
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { afterAll, beforeAll, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { Timer } from '../../src/utils/timer';
|
||||
|
||||
// @vitest-environment jsdom
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { deepRemoveDefaults } from '../../../src/utils/zod/deep-remove-defaults';
|
||||
|
||||
describe('deepNoDefaults', () => {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { z, ZodError } from 'zod';
|
||||
|
||||
import { getParseError, getParseErrorPaths } from '../../../src/utils/zod/parse-errors';
|
||||
|
||||
describe('getParseErrorPaths', () => {
|
||||
|
||||
Reference in New Issue
Block a user