Enable @typescript-eslint/consistent-type-imports lint rule (#2886)

* Enable @typescript-eslint/consistent-type-imports lint rule

This is to help ensure that we get proper vite/rollup lazy loading by not `import`ing more than we need to.

Revert "Enable @typescript-eslint/consistent-type-imports lint rule"

This reverts commit ba385fa00b7e410cc508fd5fb9fe972233ae114f.

Enable @typescript-eslint/consistent-type-imports lint rule

This is to help ensure that we get proper vite/rollup lazy loading by not `import`ing more than we need to.

.

* Format
This commit is contained in:
Hugh Nimmo-Smith
2024-12-11 09:27:55 +00:00
committed by GitHub
parent 8558f0349f
commit 0087e37f30
149 changed files with 523 additions and 425 deletions

View File

@@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details.
*/
import {
FC,
type FC,
createContext,
useCallback,
useContext,
@@ -16,7 +16,7 @@ import {
useState,
} from "react";
import { createMediaDeviceObserver } from "@livekit/components-core";
import { Observable } from "rxjs";
import { type Observable } from "rxjs";
import { logger } from "matrix-js-sdk/src/logger";
import {
@@ -24,7 +24,7 @@ import {
audioInput as audioInputSetting,
audioOutput as audioOutputSetting,
videoInput as videoInputSetting,
Setting,
type Setting,
} from "../settings/settings";
import { isFirefox } from "../Platform";

View File

@@ -5,11 +5,11 @@ SPDX-License-Identifier: AGPL-3.0-only
Please see LICENSE in the repository root for full details.
*/
import { IOpenIDToken, MatrixClient } from "matrix-js-sdk/src/matrix";
import { type IOpenIDToken, type MatrixClient } from "matrix-js-sdk/src/matrix";
import { logger } from "matrix-js-sdk/src/logger";
import { MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession";
import { type MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession";
import { useEffect, useState } from "react";
import { LivekitFocus } from "matrix-js-sdk/src/matrixrtc/LivekitFocus";
import { type LivekitFocus } from "matrix-js-sdk/src/matrixrtc/LivekitFocus";
import { useActiveLivekitFocus } from "../room/useActiveFocus";

View File

@@ -8,10 +8,10 @@ Please see LICENSE in the repository root for full details.
import {
AudioPresets,
DefaultReconnectPolicy,
RoomOptions,
type RoomOptions,
ScreenSharePresets,
TrackPublishDefaults,
VideoPreset,
type TrackPublishDefaults,
type VideoPreset,
VideoPresets,
} from "livekit-client";

View File

@@ -6,10 +6,10 @@ Please see LICENSE in the repository root for full details.
*/
import {
AudioCaptureOptions,
type AudioCaptureOptions,
ConnectionState,
LocalTrack,
Room,
type LocalTrack,
type Room,
RoomEvent,
Track,
} from "livekit-client";
@@ -17,7 +17,7 @@ import { useCallback, useEffect, useRef, useState } from "react";
import { logger } from "matrix-js-sdk/src/logger";
import * as Sentry from "@sentry/react";
import { SFUConfig, sfuConfigEquals } from "./openIDSFU";
import { type SFUConfig, sfuConfigEquals } from "./openIDSFU";
import { PosthogAnalytics } from "../analytics/PosthogAnalytics";
declare global {

View File

@@ -7,32 +7,32 @@ Please see LICENSE in the repository root for full details.
import {
ConnectionState,
E2EEOptions,
type E2EEOptions,
ExternalE2EEKeyProvider,
Room,
RoomOptions,
type RoomOptions,
Track,
} from "livekit-client";
import { useEffect, useMemo, useRef } from "react";
import E2EEWorker from "livekit-client/e2ee-worker?worker";
import { logger } from "matrix-js-sdk/src/logger";
import { MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession";
import { type MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession";
import { defaultLiveKitOptions } from "./options";
import { SFUConfig } from "./openIDSFU";
import { MuteStates } from "../room/MuteStates";
import { type SFUConfig } from "./openIDSFU";
import { type MuteStates } from "../room/MuteStates";
import {
MediaDevice,
MediaDevices,
type MediaDevice,
type MediaDevices,
useMediaDevices,
} from "./MediaDevicesContext";
import {
ECConnectionState,
type ECConnectionState,
useECConnectionState,
} from "./useECConnectionState";
import { MatrixKeyProvider } from "../e2ee/matrixKeyProvider";
import { E2eeType } from "../e2ee/e2eeType";
import { EncryptionSystem } from "../e2ee/sharedKeyManagement";
import { type EncryptionSystem } from "../e2ee/sharedKeyManagement";
interface UseLivekitResult {
livekitRoom?: Room;