Switch to importing models/Room from main js-sdk export (#11361)

* Switch to importing TypedEventEmitter from main js-sdk export

* Switch to importing js-sdk/matrix in cypress

* Remove duplicated imports

* Fix lint:js-fix to run prettier last otherwise ESLint --fix may cause a mess

* Add lint rule

* Switch to importing models/Room from main js-sdk export

* Fix cypress-axe import

* Fix more imports

* Fix cypress-axe import

* Fix duplicated lint rule
This commit is contained in:
Michael Telatynski 2023-08-04 08:36:16 +01:00 committed by GitHub
parent 5ee8e61bf5
commit e67ca33c4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
233 changed files with 282 additions and 314 deletions

View file

@ -20,7 +20,7 @@ limitations under the License.
import React, { ContextType, createRef, CSSProperties, MutableRefObject, ReactNode } from "react";
import classNames from "classnames";
import { IWidget, MatrixCapabilities } from "matrix-widget-api";
import { Room, RoomEvent } from "matrix-js-sdk/src/models/room";
import { Room, RoomEvent } from "matrix-js-sdk/src/matrix";
import { logger } from "matrix-js-sdk/src/logger";
import { ApprovalOpts, WidgetLifecycle } from "@matrix-org/react-sdk-module-api/lib/lifecycles/WidgetLifecycle";

View file

@ -16,7 +16,7 @@ limitations under the License.
*/
import React, { ContextType, CSSProperties, MutableRefObject } from "react";
import { Room } from "matrix-js-sdk/src/models/room";
import { Room } from "matrix-js-sdk/src/matrix";
import WidgetUtils from "../../../utils/WidgetUtils";
import AppTile from "./AppTile";

View file

@ -16,8 +16,7 @@ limitations under the License.
import React, { ReactElement, useRef, useState } from "react";
import classNames from "classnames";
import { Room } from "matrix-js-sdk/src/models/room";
import { RoomMember } from "matrix-js-sdk/src/matrix";
import { Room, RoomMember } from "matrix-js-sdk/src/matrix";
import { MatrixClientPeg } from "../../../MatrixClientPeg";
import MatrixClientContext from "../../../contexts/MatrixClientContext";

View file

@ -15,7 +15,7 @@ limitations under the License.
*/
import React, { ChangeEvent, createRef } from "react";
import { Room } from "matrix-js-sdk/src/models/room";
import { Room } from "matrix-js-sdk/src/matrix";
import {
KnownPollKind,
M_POLL_KIND_DISCLOSED,

View file

@ -18,7 +18,7 @@ limitations under the License.
import React from "react";
import classNames from "classnames";
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
import { Room } from "matrix-js-sdk/src/models/room";
import { Room } from "matrix-js-sdk/src/matrix";
import { MatrixClient } from "matrix-js-sdk/src/client";
import { _t } from "../../../languageHandler";

View file

@ -15,7 +15,7 @@ limitations under the License.
*/
import React, { FC, HTMLAttributes, useContext } from "react";
import { Room } from "matrix-js-sdk/src/models/room";
import { Room } from "matrix-js-sdk/src/matrix";
import { RoomMember } from "matrix-js-sdk/src/models/room-member";
import { sortBy } from "lodash";

View file

@ -15,7 +15,7 @@ limitations under the License.
*/
import React, { useEffect, useState } from "react";
import { Room, RoomEvent } from "matrix-js-sdk/src/models/room";
import { Room, RoomEvent } from "matrix-js-sdk/src/matrix";
import { useTypedEventEmitter } from "../../../hooks/useEventEmitter";

View file

@ -15,7 +15,7 @@ limitations under the License.
*/
import React, { useCallback, useContext, useRef } from "react";
import { Room } from "matrix-js-sdk/src/models/room";
import { Room } from "matrix-js-sdk/src/matrix";
import classNames from "classnames";
import { EventType } from "matrix-js-sdk/src/@types/event";