Fix the mechanical style rules. [skip build]

This commit is contained in:
2026-11-01 09:01:32 +11:00
parent 831ce01150
commit 9591d8d01b
42 changed files with 762 additions and 756 deletions
@@ -45,7 +45,7 @@ async function leaveRoomsSequentially(
): Promise<void> {
const total = roomIds.length;
for (let i = 0; i < roomIds.length; i++) {
for (let i = 0; i < roomIds.length; i += 1) {
const roomId = roomIds[i];
onProgress?.(i, total);
+2 -2
View File
@@ -25,9 +25,9 @@ export const Video = forwardRef<HTMLVideoElement, VideoProps>(
}, [ref]);
useEffect(() => {
if (!onExpand) return;
if (!onExpand) return undefined;
const video = videoRef.current;
if (!video) return;
if (!video) return undefined;
const handleFullscreenRequest = (evt: Event) => {
evt.preventDefault();
@@ -91,7 +91,7 @@ export async function collectInaccessibleSpaceChildren(
if (!spaceRoom || spaceRoom.getMyMembership() !== Membership.Join) return;
if (!canEditSpaceChildren(mx, spaceRoom)) return;
for (const childId of getSpaceChildren(spaceRoom)) {
getSpaceChildren(spaceRoom).forEach((childId) => {
childCount += 1;
const childRoom = mx.getRoom(childId);
// Lobby uses joined-only getRoom; left/invite rooms still render as Inaccessible.
@@ -100,22 +100,22 @@ export async function collectInaccessibleSpaceChildren(
if (joined && childRoom && isSpace(childRoom)) {
joinedCount += 1;
walk(childId);
continue;
return;
}
if (joined) {
joinedCount += 1;
continue;
return;
}
const hasHierarchySummary = hierarchySummaries.has(childId);
if (hasHierarchySummary) {
joinableCount += 1;
continue;
return;
}
inaccessible.push({ parentId: spaceId, roomId: childId });
}
});
};
walk(rootSpaceId);
@@ -30,7 +30,7 @@ export function SettingTile({
const anchorId = anchorIdProp ?? autoAnchorId;
useEffect(() => {
if (!anchorId || !focusAnchorId || anchorId !== focusAnchorId) return;
if (!anchorId || !focusAnchorId || anchorId !== focusAnchorId) return undefined;
let cancelled = false;
let attempts = 0;
@@ -57,7 +57,7 @@ export function SettingTile({
}, [anchorId, focusAnchorId, setAnchorId]);
useEffect(() => {
if (!highlighted) return;
if (!highlighted) return undefined;
const timer = window.setTimeout(() => setHighlighted(false), 1400);
return () => window.clearTimeout(timer);
}, [highlighted]);
+2 -2
View File
@@ -316,7 +316,7 @@ export function TitleBar({ mx, children }: TitleBarProps) {
// Subscribe to room changes for unread updates and new messages
useEffect(() => {
if (!mx) return;
if (!mx) return undefined;
const update = () => setUpdateCounter((c) => c + 1);
@@ -473,7 +473,7 @@ export function TitleBar({ mx, children }: TitleBarProps) {
// Clear notifications when user reads messages in a room
useEffect(() => {
if (!mx) return;
if (!mx) return undefined;
const handleReceipt = (event: MatrixEvent, room: Room) => {
const myUserId = mx.getUserId();