Skip to content

Commit

Permalink
Fix resulting violations
Browse files Browse the repository at this point in the history
Revert "Fix resulting violations"

This reverts commit 9aea668.

Fix violations
  • Loading branch information
hughns committed Jan 10, 2025
1 parent f636071 commit a1969b8
Show file tree
Hide file tree
Showing 173 changed files with 1,185 additions and 1,075 deletions.
2 changes: 1 addition & 1 deletion src/@types/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/

import { UnstableValue } from "../NamespacedValue.ts";
import { IClientWellKnown } from "../client.ts";
import { type IClientWellKnown } from "../client.ts";

// disable lint because these are wire responses
/* eslint-disable camelcase */
Expand Down
4 changes: 2 additions & 2 deletions src/@types/beacon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { RelatesToRelationship, REFERENCE_RELATION } from "./extensible_events.ts";
import { type RelatesToRelationship, type REFERENCE_RELATION } from "./extensible_events.ts";
import { UnstableValue } from "../NamespacedValue.ts";
import { MAssetEvent, MLocationEvent, MTimestampEvent } from "./location.ts";
import { type MAssetEvent, type MLocationEvent, type MTimestampEvent } from "./location.ts";

/**
* Beacon info and beacon event types as described in MSC3672
Expand Down
78 changes: 39 additions & 39 deletions src/@types/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,48 +16,48 @@ limitations under the License.

import { NamespacedValue, UnstableValue } from "../NamespacedValue.ts";
import {
PolicyRuleEventContent,
RoomAvatarEventContent,
RoomCanonicalAliasEventContent,
RoomCreateEventContent,
RoomEncryptionEventContent,
RoomGuestAccessEventContent,
RoomHistoryVisibilityEventContent,
RoomJoinRulesEventContent,
RoomMemberEventContent,
RoomNameEventContent,
RoomPinnedEventsEventContent,
RoomPowerLevelsEventContent,
RoomServerAclEventContent,
RoomThirdPartyInviteEventContent,
RoomTombstoneEventContent,
RoomTopicEventContent,
SpaceChildEventContent,
SpaceParentEventContent,
type PolicyRuleEventContent,
type RoomAvatarEventContent,
type RoomCanonicalAliasEventContent,
type RoomCreateEventContent,
type RoomEncryptionEventContent,
type RoomGuestAccessEventContent,
type RoomHistoryVisibilityEventContent,
type RoomJoinRulesEventContent,
type RoomMemberEventContent,
type RoomNameEventContent,
type RoomPinnedEventsEventContent,
type RoomPowerLevelsEventContent,
type RoomServerAclEventContent,
type RoomThirdPartyInviteEventContent,
type RoomTombstoneEventContent,
type RoomTopicEventContent,
type SpaceChildEventContent,
type SpaceParentEventContent,
} from "./state_events.ts";
import { IGroupCallRoomMemberState, IGroupCallRoomState } from "../webrtc/groupCall.ts";
import { MSC3089EventContent } from "../models/MSC3089Branch.ts";
import { M_BEACON, M_BEACON_INFO, MBeaconEventContent, MBeaconInfoEventContent } from "./beacon.ts";
import { XOR } from "./common.ts";
import { ReactionEventContent, RoomMessageEventContent, StickerEventContent } from "./events.ts";
import { type IGroupCallRoomMemberState, type IGroupCallRoomState } from "../webrtc/groupCall.ts";
import { type MSC3089EventContent } from "../models/MSC3089Branch.ts";
import { type M_BEACON, type M_BEACON_INFO, type MBeaconEventContent, type MBeaconInfoEventContent } from "./beacon.ts";
import { type XOR } from "./common.ts";
import { type ReactionEventContent, type RoomMessageEventContent, type StickerEventContent } from "./events.ts";
import {
MCallAnswer,
MCallBase,
MCallCandidates,
MCallHangupReject,
MCallInviteNegotiate,
MCallReplacesEvent,
MCallSelectAnswer,
SDPStreamMetadata,
SDPStreamMetadataKey,
type MCallAnswer,
type MCallBase,
type MCallCandidates,
type MCallHangupReject,
type MCallInviteNegotiate,
type MCallReplacesEvent,
type MCallSelectAnswer,
type SDPStreamMetadata,
type SDPStreamMetadataKey,
} from "../webrtc/callEventTypes.ts";
import { EncryptionKeysEventContent, ICallNotifyContent } from "../matrixrtc/types.ts";
import { M_POLL_END, M_POLL_START, PollEndEventContent, PollStartEventContent } from "./polls.ts";
import { SessionMembershipData } from "../matrixrtc/CallMembership.ts";
import { LocalNotificationSettings } from "./local_notifications.ts";
import { IPushRules } from "./PushRules.ts";
import { SecretInfo, SecretStorageKeyDescription } from "../secret-storage.ts";
import { POLICIES_ACCOUNT_EVENT_TYPE } from "../models/invites-ignorer-types.ts";
import { type EncryptionKeysEventContent, type ICallNotifyContent } from "../matrixrtc/types.ts";
import { type M_POLL_END, type M_POLL_START, type PollEndEventContent, type PollStartEventContent } from "./polls.ts";
import { type SessionMembershipData } from "../matrixrtc/CallMembership.ts";
import { type LocalNotificationSettings } from "./local_notifications.ts";
import { type IPushRules } from "./PushRules.ts";
import { type SecretInfo, type SecretStorageKeyDescription } from "../secret-storage.ts";
import { type POLICIES_ACCOUNT_EVENT_TYPE } from "../models/invites-ignorer-types.ts";

export enum EventType {
// Room state events
Expand Down
6 changes: 3 additions & 3 deletions src/@types/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { MsgType, RelationType } from "./event.ts";
import { FileInfo, ImageInfo, MediaEventContent } from "./media.ts";
import { XOR } from "./common.ts";
import { type MsgType, type RelationType } from "./event.ts";
import { type FileInfo, type ImageInfo, type MediaEventContent } from "./media.ts";
import { type XOR } from "./common.ts";

interface BaseTimelineEvent {
"body": string;
Expand Down
2 changes: 1 addition & 1 deletion src/@types/extensible_events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { EitherAnd, NamespacedValue, Optional, UnstableValue } from "matrix-events-sdk";
import { type EitherAnd, NamespacedValue, type Optional, UnstableValue } from "matrix-events-sdk";

import { isProvided } from "../extensible_events_v1/utilities.ts";

Expand Down
4 changes: 2 additions & 2 deletions src/@types/location.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ limitations under the License.
*/

// Types for MSC3488 - m.location: Extending events with location data
import { EitherAnd } from "matrix-events-sdk";
import { type EitherAnd } from "matrix-events-sdk";

import { UnstableValue } from "../NamespacedValue.ts";
import { M_TEXT } from "./extensible_events.ts";
import { type M_TEXT } from "./extensible_events.ts";

export enum LocationAssetType {
Self = "m.self",
Expand Down
2 changes: 1 addition & 1 deletion src/@types/media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { MsgType } from "../@types/event.ts";
import { type MsgType } from "../@types/event.ts";

/**
* Information on encrypted media attachments.
Expand Down
10 changes: 5 additions & 5 deletions src/@types/polls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { EitherAnd, UnstableValue } from "matrix-events-sdk";
import { type EitherAnd, UnstableValue } from "matrix-events-sdk";

import {
ExtensibleAnyMessageEventContent,
REFERENCE_RELATION,
RelatesToRelationship,
TSNamespace,
type ExtensibleAnyMessageEventContent,
type REFERENCE_RELATION,
type RelatesToRelationship,
type TSNamespace,
} from "./extensible_events.ts";

/**
Expand Down
2 changes: 1 addition & 1 deletion src/@types/registration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { AuthDict } from "../interactive-auth.ts";
import { type AuthDict } from "../interactive-auth.ts";

/**
* The request body of a call to `POST /_matrix/client/v3/register`.
Expand Down
16 changes: 8 additions & 8 deletions src/@types/requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { IContent, IEvent } from "../models/event.ts";
import { Preset, Visibility } from "./partials.ts";
import { IEventWithRoomId, SearchKey } from "./search.ts";
import { IRoomEventFilter } from "../filter.ts";
import { Direction } from "../models/event-timeline.ts";
import { PushRuleAction } from "./PushRules.ts";
import { IRoomEvent } from "../sync-accumulator.ts";
import { EventType, RelationType, RoomType } from "./event.ts";
import { type IContent, type IEvent } from "../models/event.ts";
import { type Preset, type Visibility } from "./partials.ts";
import { type IEventWithRoomId, type SearchKey } from "./search.ts";
import { type IRoomEventFilter } from "../filter.ts";
import { type Direction } from "../models/event-timeline.ts";
import { type PushRuleAction } from "./PushRules.ts";
import { type IRoomEvent } from "../sync-accumulator.ts";
import { type EventType, type RelationType, type RoomType } from "./event.ts";

// allow camelcase as these are things that go onto the wire
/* eslint-disable camelcase */
Expand Down
6 changes: 3 additions & 3 deletions src/@types/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ limitations under the License.

// Types relating to the /search API

import { IRoomEvent, IStateEvent } from "../sync-accumulator.ts";
import { IRoomEventFilter } from "../filter.ts";
import { SearchResult } from "../models/search-result.ts";
import { type IRoomEvent, type IStateEvent } from "../sync-accumulator.ts";
import { type IRoomEventFilter } from "../filter.ts";
import { type SearchResult } from "../models/search-result.ts";

/* eslint-disable camelcase */
export interface IEventWithRoomId extends IRoomEvent {
Expand Down
6 changes: 3 additions & 3 deletions src/@types/spaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { IPublicRoomsChunkRoom } from "../client.ts";
import { RoomType } from "./event.ts";
import { IStrippedState } from "../sync-accumulator.ts";
import { type IPublicRoomsChunkRoom } from "../client.ts";
import { type RoomType } from "./event.ts";
import { type IStrippedState } from "../sync-accumulator.ts";

// Types relating to Rooms of type `m.space` and related APIs

Expand Down
8 changes: 4 additions & 4 deletions src/@types/state_events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { RoomType } from "./event.ts";
import { GuestAccess, HistoryVisibility, JoinRule, RestrictedAllowType } from "./partials.ts";
import { ImageInfo } from "./media.ts";
import { PolicyRecommendation } from "../models/invites-ignorer.ts";
import { type RoomType } from "./event.ts";
import { type GuestAccess, type HistoryVisibility, type JoinRule, type RestrictedAllowType } from "./partials.ts";
import { type ImageInfo } from "./media.ts";
import { type PolicyRecommendation } from "../models/invites-ignorer.ts";

export interface RoomCanonicalAliasEventContent {
alias?: string;
Expand Down
2 changes: 1 addition & 1 deletion src/@types/synapse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { IdServerUnbindResult } from "./partials.ts";
import { type IdServerUnbindResult } from "./partials.ts";

// Types relating to Synapse Admin APIs

Expand Down
4 changes: 2 additions & 2 deletions src/@types/topic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { EitherAnd } from "matrix-events-sdk";
import { type EitherAnd } from "matrix-events-sdk";

import { UnstableValue } from "../NamespacedValue.ts";
import { IMessageRendering } from "./extensible_events.ts";
import { type IMessageRendering } from "./extensible_events.ts";

/**
* Extensible topic event type based on MSC3765
Expand Down
2 changes: 1 addition & 1 deletion src/@types/uia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { AuthDict, IAuthData } from "../interactive-auth.ts";
import { type AuthDict, type IAuthData } from "../interactive-auth.ts";

/**
* Helper type to represent HTTP request body for a UIA enabled endpoint
Expand Down
2 changes: 1 addition & 1 deletion src/NamespacedValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { Optional } from "matrix-events-sdk/lib/types";
import { type Optional } from "matrix-events-sdk/lib/types";

/**
* Represents a simple Matrix namespaced value. This will assume that if a stable prefix
Expand Down
4 changes: 2 additions & 2 deletions src/ReEmitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ limitations under the License.
*/

// eslint-disable-next-line no-restricted-imports
import { EventEmitter } from "events";
import { type EventEmitter } from "events";

import { ListenerMap, TypedEventEmitter } from "./models/typed-event-emitter.ts";
import { type ListenerMap, type TypedEventEmitter } from "./models/typed-event-emitter.ts";

export class ReEmitter {
public constructor(private readonly target: EventEmitter) {}
Expand Down
12 changes: 6 additions & 6 deletions src/ToDeviceMessageQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ limitations under the License.

import { ToDeviceMessageId } from "./@types/event.ts";
import { logger } from "./logger.ts";
import { MatrixClient, ClientEvent } from "./client.ts";
import { MatrixError } from "./http-api/index.ts";
import { type MatrixClient, ClientEvent } from "./client.ts";
import { type MatrixError } from "./http-api/index.ts";
import {
IndexedToDeviceBatch,
ToDeviceBatch,
ToDeviceBatchWithTxnId,
ToDevicePayload,
type IndexedToDeviceBatch,
type ToDeviceBatch,
type ToDeviceBatchWithTxnId,
type ToDevicePayload,
} from "./models/ToDeviceMessage.ts";
import { MatrixScheduler } from "./scheduler.ts";
import { SyncState } from "./sync.ts";
Expand Down
4 changes: 2 additions & 2 deletions src/autodiscovery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { IClientWellKnown, IWellKnownConfig, IServerVersions } from "./client.ts";
import { type IClientWellKnown, type IWellKnownConfig, type IServerVersions } from "./client.ts";
import { logger } from "./logger.ts";
import { MatrixError, Method, timeoutSignal } from "./http-api/index.ts";
import { type MatrixError, Method, timeoutSignal } from "./http-api/index.ts";
import { SUPPORTED_MATRIX_VERSIONS } from "./version-support.ts";

// Dev note: Auto discovery is part of the spec.
Expand Down
Loading

0 comments on commit a1969b8

Please sign in to comment.