chore: upgrade i18next 26, prettier 3, fontsource-variable, domhandler 6, lint-staged 17
- i18next 23->26 + react-i18next 15->17 - prettier 2->3, reformat all files - replace @fontsource/inter with @fontsource-variable/inter 5, update import path - domhandler 5->6 (aligns with transitive deps) - lint-staged 16->17
This commit is contained in:
@@ -230,7 +230,7 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => {
|
||||
exe: async (payload) => {
|
||||
const rawIds = splitWithSpace(payload);
|
||||
const roomIdOrAliases = rawIds.filter(
|
||||
(idOrAlias) => isRoomId(idOrAlias) || isRoomAlias(idOrAlias)
|
||||
(idOrAlias) => isRoomId(idOrAlias) || isRoomAlias(idOrAlias),
|
||||
);
|
||||
await Promise.all(roomIdOrAliases.map((idOrAlias) => mx.joinRoom(idOrAlias)));
|
||||
},
|
||||
@@ -369,7 +369,7 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => {
|
||||
...content,
|
||||
displayname: nick,
|
||||
},
|
||||
mx.getSafeUserId()
|
||||
mx.getSafeUserId(),
|
||||
);
|
||||
},
|
||||
},
|
||||
@@ -391,7 +391,7 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => {
|
||||
...content,
|
||||
avatar_url: payload,
|
||||
},
|
||||
mx.getSafeUserId()
|
||||
mx.getSafeUserId(),
|
||||
);
|
||||
}
|
||||
},
|
||||
@@ -442,7 +442,7 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => {
|
||||
const startEventId = result.event_id;
|
||||
|
||||
const path = `/rooms/${encodeURIComponent(room.roomId)}/context/${encodeURIComponent(
|
||||
startEventId
|
||||
startEventId,
|
||||
)}`;
|
||||
const eventContext = await mx.http.authedRequest<IContextResponse>(Method.Get, path, {
|
||||
limit: 0,
|
||||
@@ -456,7 +456,7 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => {
|
||||
token,
|
||||
20,
|
||||
Direction.Forward,
|
||||
undefined
|
||||
undefined,
|
||||
);
|
||||
const { end, chunk } = response;
|
||||
// remove until the latest event;
|
||||
@@ -466,14 +466,14 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => {
|
||||
(roomEvent) =>
|
||||
(messageTypes.length > 0 ? messageTypes.includes(roomEvent.type) : true) &&
|
||||
users.includes(roomEvent.sender) &&
|
||||
roomEvent.unsigned?.redacted_because === undefined
|
||||
roomEvent.unsigned?.redacted_because === undefined,
|
||||
);
|
||||
|
||||
const eventIds = eventsToDelete.map((roomEvent) => roomEvent.event_id);
|
||||
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await rateLimitedActions(eventIds, (eventId) =>
|
||||
mx.redactEvent(room.roomId, eventId, undefined, { reason })
|
||||
mx.redactEvent(room.roomId, eventId, undefined, { reason }),
|
||||
);
|
||||
}
|
||||
},
|
||||
@@ -498,7 +498,7 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => {
|
||||
|
||||
const serverAcl = getStateEvent(
|
||||
room,
|
||||
StateEvent.RoomServerAcl
|
||||
StateEvent.RoomServerAcl,
|
||||
)?.getContent<RoomServerAclEventContent>();
|
||||
|
||||
const aclContent: RoomServerAclEventContent = {
|
||||
@@ -517,10 +517,10 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => {
|
||||
});
|
||||
|
||||
aclContent.allow = aclContent.allow?.filter(
|
||||
(servername) => !removeAllowList.includes(servername)
|
||||
(servername) => !removeAllowList.includes(servername),
|
||||
);
|
||||
aclContent.deny = aclContent.deny?.filter(
|
||||
(servername) => !removeDenyList.includes(servername)
|
||||
(servername) => !removeDenyList.includes(servername),
|
||||
);
|
||||
|
||||
aclContent.allow?.sort();
|
||||
@@ -530,7 +530,7 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => {
|
||||
},
|
||||
},
|
||||
}),
|
||||
[mx, room, navigateRoom]
|
||||
[mx, room, navigateRoom],
|
||||
);
|
||||
|
||||
return commands;
|
||||
|
||||
Reference in New Issue
Block a user