diff --git a/scripts/normalize-imports.js b/scripts/normalize-imports.js
index 77af442c3..0597d9491 100644
--- a/scripts/normalize-imports.js
+++ b/scripts/normalize-imports.js
@@ -1,5 +1,4 @@
#!/usr/bin/env node
-/* oxlint-disable no-console */
import fs from 'node:fs/promises';
import path from 'node:path';
diff --git a/scripts/utils/console-style.js b/scripts/utils/console-style.js
index ae7e29b79..7d5db0dbf 100644
--- a/scripts/utils/console-style.js
+++ b/scripts/utils/console-style.js
@@ -1,4 +1,3 @@
-/* oxlint-disable no-console */
import process from 'node:process';
export const ANSI = {
diff --git a/src/app/components/Pdf-viewer/PdfViewer.tsx b/src/app/components/Pdf-viewer/PdfViewer.tsx
index e1ac79307..53b333aca 100644
--- a/src/app/components/Pdf-viewer/PdfViewer.tsx
+++ b/src/app/components/Pdf-viewer/PdfViewer.tsx
@@ -1,5 +1,3 @@
-/* oxlint-disable no-param-reassign */
-
import type { FormEventHandler, MouseEventHandler } from 'react';
import { useEffect, useRef, useState } from 'react';
import classNames from 'classnames';
diff --git a/src/app/components/code-highlight/CodeHighlightRenderer.tsx b/src/app/components/code-highlight/CodeHighlightRenderer.tsx
index 20b5c14e4..45145fbb4 100644
--- a/src/app/components/code-highlight/CodeHighlightRenderer.tsx
+++ b/src/app/components/code-highlight/CodeHighlightRenderer.tsx
@@ -74,7 +74,6 @@ export function CodeHighlightRenderer({
}
return (
- // oxlint-disable-next-line react/no-danger
);
}
diff --git a/src/app/components/editor/Editor.tsx b/src/app/components/editor/Editor.tsx
index 4e978f6fd..e76cce520 100644
--- a/src/app/components/editor/Editor.tsx
+++ b/src/app/components/editor/Editor.tsx
@@ -1,4 +1,3 @@
-/* oxlint-disable no-param-reassign */
import type { ClipboardEventHandler, KeyboardEventHandler, ReactNode } from 'react';
import { forwardRef, useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
import { Box, Scroll, Text } from 'folds';
diff --git a/src/app/components/editor/utils.ts b/src/app/components/editor/utils.ts
index bce62bc6f..254d7a5b7 100644
--- a/src/app/components/editor/utils.ts
+++ b/src/app/components/editor/utils.ts
@@ -162,7 +162,6 @@ export const resetEditor = (editor: Editor) => {
};
export const resetEditorHistory = (editor: Editor) => {
- // oxlint-disable-next-line no-param-reassign
editor.history = {
undos: [],
redos: [],
diff --git a/src/app/components/url-preview/UrlPreviewCard.tsx b/src/app/components/url-preview/UrlPreviewCard.tsx
index 5395194bd..1171d573e 100644
--- a/src/app/components/url-preview/UrlPreviewCard.tsx
+++ b/src/app/components/url-preview/UrlPreviewCard.tsx
@@ -34,7 +34,6 @@ const getClientCache = (mx: MatrixClient): Map {
if (!url) {
- // eslint-disable-next-line no-console -- Warning for debugging
console.warn('Attempted to open an empty url');
return;
}
@@ -96,7 +95,6 @@ export const UrlPreviewCard = as<
);
const handleAuxClick = (ev: React.MouseEvent) => {
if (!prev['og:image']) {
- // eslint-disable-next-line no-console -- Debug logging for missing image
console.warn('No image');
return;
}
@@ -104,7 +102,6 @@ export const UrlPreviewCard = as<
ev.preventDefault();
const mxcUrl = mxcUrlToHttp(mx, prev['og:image'], /* useAuthentication */ true);
if (!mxcUrl) {
- // eslint-disable-next-line no-console -- Error logging for URL conversion failure
console.error('Error converting mxc:// url.');
return;
}
diff --git a/src/app/features/room/RoomInput.tsx b/src/app/features/room/RoomInput.tsx
index a1f55a0b1..ce1e2315c 100644
--- a/src/app/features/room/RoomInput.tsx
+++ b/src/app/features/room/RoomInput.tsx
@@ -519,7 +519,6 @@ export const RoomInput = forwardRef(
// We intentionally mutate the objects here to avoid unnecessary copying
// mutating should be unproblematic here, since contents isn't a react component,
// or used for rendering
- // oxlint-disable-next-line no-param-reassign
c['com.beeper.per_message_profile'] = convertPerMessageProfileToBeeperFormat(
perMessageProfile,
false
@@ -1399,7 +1398,6 @@ export const RoomInput = forwardRef(
setShowAudioRecorder(true);
function onUp() {
- // oxlint-disable-next-line eslint(no-use-before-define)
cleanup();
const held = Date.now() - micHoldStartRef.current;
if (held >= HOLD_THRESHOLD_MS) {
diff --git a/src/app/features/room/ThreadBrowser.tsx b/src/app/features/room/ThreadBrowser.tsx
index 533b80605..1420ffd1b 100644
--- a/src/app/features/room/ThreadBrowser.tsx
+++ b/src/app/features/room/ThreadBrowser.tsx
@@ -324,7 +324,6 @@ export function ThreadBrowser({ room, onOpenThread, onClose, overlay }: ThreadBr
// Now fetch page 1 from the /threads endpoint. threadsTimelineSets is
// populated so fetchRoomThreadList will not early-return.
await room.fetchRoomThreads().catch((err: unknown) => {
- // oxlint-disable-next-line no-console
console.warn('ThreadBrowser: fetchRoomThreads failed', err);
});
diff --git a/src/app/features/room/ThreadDrawer.tsx b/src/app/features/room/ThreadDrawer.tsx
index 327a6a1cf..1694132a3 100644
--- a/src/app/features/room/ThreadDrawer.tsx
+++ b/src/app/features/room/ThreadDrawer.tsx
@@ -406,7 +406,6 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra
try {
await mx.sendReadReceipt(lastEvent, ReceiptType.Read);
} catch (err) {
- // oxlint-disable-next-line no-console
console.warn('Failed to send thread read receipt:', err);
}
}
diff --git a/src/app/features/room/message/Message.tsx b/src/app/features/room/message/Message.tsx
index fc0ada648..2c7a703de 100644
--- a/src/app/features/room/message/Message.tsx
+++ b/src/app/features/room/message/Message.tsx
@@ -1117,7 +1117,6 @@ function MessageInternal(
>
Nickname
setNickDraft(e.target.value)}
diff --git a/src/app/features/room/room-pin-menu/RoomPinMenu.tsx b/src/app/features/room/room-pin-menu/RoomPinMenu.tsx
index 58e358f5a..066fa6d67 100644
--- a/src/app/features/room/room-pin-menu/RoomPinMenu.tsx
+++ b/src/app/features/room/room-pin-menu/RoomPinMenu.tsx
@@ -1,4 +1,3 @@
-/* eslint-disable react/no-unused-prop-types */
import type { MouseEventHandler, ReactNode } from 'react';
import { forwardRef, useCallback, useMemo, useRef } from 'react';
import type { MatrixEvent, Room, RoomPinnedEventsEventContent } from '$types/matrix-sdk';
diff --git a/src/app/features/settings/Persona/PerMessageProfileEditor.tsx b/src/app/features/settings/Persona/PerMessageProfileEditor.tsx
index 7980bcd53..29e0aad0a 100644
--- a/src/app/features/settings/Persona/PerMessageProfileEditor.tsx
+++ b/src/app/features/settings/Persona/PerMessageProfileEditor.tsx
@@ -45,7 +45,6 @@ export function PerMessageProfileEditor({
const [currentId, setCurrentId] = useState(profileId);
const [newId, setNewId] = useState(profileId);
- // eslint-disable-next-line no-console -- Debug logging for pronouns
console.warn(pronouns);
// Pronouns
diff --git a/src/app/features/settings/developer-tools/DebugLogViewer.tsx b/src/app/features/settings/developer-tools/DebugLogViewer.tsx
index c863ea7d7..da78aeffc 100644
--- a/src/app/features/settings/developer-tools/DebugLogViewer.tsx
+++ b/src/app/features/settings/developer-tools/DebugLogViewer.tsx
@@ -207,7 +207,6 @@ export function DebugLogViewer() {
category: filterCategory !== 'all' ? filterCategory : 'none',
},
logsCount: logsToExport.length,
- // oxlint-disable-next-line oxc/no-map-spread
logs: logsToExport.map((log) => ({
...log,
timestamp: new Date(log.timestamp).toISOString(),
@@ -256,7 +255,6 @@ export function DebugLogViewer() {
category: filterCategory !== 'all' ? filterCategory : 'none',
},
logsCount: logsToExport.length,
- // oxlint-disable-next-line oxc/no-map-spread
logs: logsToExport.map((log) => ({
...log,
timestamp: new Date(log.timestamp).toISOString(),
diff --git a/src/app/features/settings/notifications/SystemNotification.tsx b/src/app/features/settings/notifications/SystemNotification.tsx
index 266437849..fafe0a793 100644
--- a/src/app/features/settings/notifications/SystemNotification.tsx
+++ b/src/app/features/settings/notifications/SystemNotification.tsx
@@ -1,4 +1,3 @@
-/* oxlint-disable no-nested-ternary */
import { useCallback, useEffect, useState } from 'react';
import { Box, Text, Switch, Button, color, Spinner, config } from 'folds';
import type { IPusherRequest } from '$types/matrix-sdk';
diff --git a/src/app/features/widgets/GenericWidgetDriver.ts b/src/app/features/widgets/GenericWidgetDriver.ts
index 21a500fd3..2bbebeae5 100644
--- a/src/app/features/widgets/GenericWidgetDriver.ts
+++ b/src/app/features/widgets/GenericWidgetDriver.ts
@@ -340,7 +340,6 @@ export class GenericWidgetDriver extends WidgetDriver {
return this.mxClient.getVisibleRooms().map((r: Room) => r.roomId);
}
- // oxlint-disable-next-line class-methods-use-this -- WidgetDriver requires an instance override
public processError(error: unknown): IWidgetApiErrorResponseDataDetails | undefined {
return error instanceof MatrixError
? { matrix_api_error: error.asWidgetApiErrorData() }
diff --git a/src/app/hooks/usePowerLevels.ts b/src/app/hooks/usePowerLevels.ts
index db22a6fff..98686b082 100644
--- a/src/app/hooks/usePowerLevels.ts
+++ b/src/app/hooks/usePowerLevels.ts
@@ -46,13 +46,11 @@ const fillMissingPowers = (powerLevels: IPowerLevels): IPowerLevels =>
const keys = Object.keys(DEFAULT_POWER_LEVELS) as unknown as (keyof IPowerLevels)[];
keys.forEach((key) => {
if (draftPl[key] === undefined) {
- // oxlint-disable-next-line no-param-reassign
(draftPl as Record)[key] =
(DEFAULT_POWER_LEVELS as Record)[key] ?? 0;
}
});
if (draftPl.notifications && typeof draftPl.notifications.room !== 'number') {
- // oxlint-disable-next-line no-param-reassign
draftPl.notifications.room = DEFAULT_POWER_LEVELS.notifications.room as number;
}
return draftPl;
@@ -237,23 +235,19 @@ export const applyPermissionPower = (
if (typeof location.key === 'string') {
const users = powerLevels.users ?? {};
users[location.key] = power;
- // oxlint-disable-next-line no-param-reassign
powerLevels.users = users;
return powerLevels;
}
- // oxlint-disable-next-line no-param-reassign
powerLevels.users_default = power;
return powerLevels;
}
if ('action' in location) {
- // oxlint-disable-next-line no-param-reassign
powerLevels[location.key] = power;
return powerLevels;
}
if ('notification' in location) {
const notifications = powerLevels.notifications ?? {};
notifications[location.key] = power;
- // oxlint-disable-next-line no-param-reassign
powerLevels.notifications = notifications;
return powerLevels;
}
@@ -261,11 +255,9 @@ export const applyPermissionPower = (
if (typeof location.key === 'string') {
const events = powerLevels.events ?? {};
events[location.key] = power;
- // oxlint-disable-next-line no-param-reassign
powerLevels.events = events;
return powerLevels;
}
- // oxlint-disable-next-line no-param-reassign
powerLevels.state_default = power;
return powerLevels;
}
@@ -273,11 +265,9 @@ export const applyPermissionPower = (
if (typeof location.key === 'string') {
const events = powerLevels.events ?? {};
events[location.key] = power;
- // oxlint-disable-next-line no-param-reassign
powerLevels.events = events;
return powerLevels;
}
- // oxlint-disable-next-line no-param-reassign
powerLevels.events_default = power;
return powerLevels;
};
diff --git a/src/app/hooks/useRoomLatestRenderedEvent.ts b/src/app/hooks/useRoomLatestRenderedEvent.ts
index 41fbb3b64..7962f6cbf 100644
--- a/src/app/hooks/useRoomLatestRenderedEvent.ts
+++ b/src/app/hooks/useRoomLatestRenderedEvent.ts
@@ -1,4 +1,3 @@
-/* oxlint-disable no-continue */
import type { MatrixEvent, Room, RoomEventHandlerMap } from '$types/matrix-sdk';
import { RoomEvent } from '$types/matrix-sdk';
import { useEffect, useState } from 'react';
diff --git a/src/app/pages/client/ClientNonUIFeatures.tsx b/src/app/pages/client/ClientNonUIFeatures.tsx
index 3edabe642..9644e55c0 100644
--- a/src/app/pages/client/ClientNonUIFeatures.tsx
+++ b/src/app/pages/client/ClientNonUIFeatures.tsx
@@ -819,7 +819,6 @@ function HandleDecryptPushEvent() {
visibilityState: document.visibilityState,
});
} catch (err) {
- // eslint-disable-next-line no-console -- Warning logging for push decryption failure
console.warn('[app] HandleDecryptPushEvent: failed to decrypt push event', err);
pushRelayLog.error(
'notification',
diff --git a/src/app/plugins/call/CallControl.ts b/src/app/plugins/call/CallControl.ts
index e4c31eb69..fb2e6ff44 100644
--- a/src/app/plugins/call/CallControl.ts
+++ b/src/app/plugins/call/CallControl.ts
@@ -134,7 +134,6 @@ export class CallControl extends EventEmitter implements CallControlState {
const callDocument = this.iframe.contentDocument ?? this.iframe.contentWindow?.document;
if (callDocument) {
callDocument.querySelectorAll('audio').forEach((el) => {
- // oxlint-disable-next-line no-param-reassign
el.muted = !sound;
});
}
diff --git a/src/app/plugins/call/CallEmbed.ts b/src/app/plugins/call/CallEmbed.ts
index 2ee2ef2df..7c7c49ee4 100644
--- a/src/app/plugins/call/CallEmbed.ts
+++ b/src/app/plugins/call/CallEmbed.ts
@@ -303,7 +303,6 @@ export class CallEmbed {
if (this.call === null) return;
const raw = ev.getEffectiveEvent();
this.call.feedStateUpdate(raw as IRoomEvent).catch((e) => {
- // eslint-disable-next-line no-console -- Error logging for widget communication debugging
console.error('Error sending state update to widget: ', e);
});
}
@@ -410,7 +409,6 @@ export class CallEmbed {
} else {
const raw = ev.getEffectiveEvent();
this.call.feedEvent(raw as IRoomEvent).catch((e) => {
- // eslint-disable-next-line no-console -- Error logging for widget communication debugging
console.error('Error sending event to widget: ', e);
});
}
diff --git a/src/app/plugins/call/CallWidgetDriver.ts b/src/app/plugins/call/CallWidgetDriver.ts
index 07be61626..29480d06e 100644
--- a/src/app/plugins/call/CallWidgetDriver.ts
+++ b/src/app/plugins/call/CallWidgetDriver.ts
@@ -365,7 +365,6 @@ export class CallWidgetDriver extends WidgetDriver {
return this.mx.getVisibleRooms().map((r) => r.roomId);
}
- // oxlint-disable-next-line class-methods-use-this
public processError(error: unknown): IWidgetApiErrorResponseDataDetails | undefined {
return error instanceof MatrixError
? { matrix_api_error: error.asWidgetApiErrorData() }
diff --git a/src/app/utils/MegolmExportEncryption.ts b/src/app/utils/MegolmExportEncryption.ts
index 09bb55b10..5a35bce54 100644
--- a/src/app/utils/MegolmExportEncryption.ts
+++ b/src/app/utils/MegolmExportEncryption.ts
@@ -1,5 +1,3 @@
-/* oxlint-disable no-bitwise */
-/* oxlint-disable no-plusplus */
// https://github.com/element-hq/element-web/blob/a5b63d582fde59ea4dd3c7fdcad7266ab70dd695/apps/web/src/utils/MegolmExportEncryption.ts
import { createLogger } from './debug';
diff --git a/src/app/utils/colorMXID.ts b/src/app/utils/colorMXID.ts
index 35cad78ab..c59108591 100644
--- a/src/app/utils/colorMXID.ts
+++ b/src/app/utils/colorMXID.ts
@@ -7,7 +7,6 @@ function hashCode(str?: string): number {
}
for (let i = 0; i < str.length; i += 1) {
const chr = str.codePointAt(i) ?? 0;
- // oxlint-disable-next-line no-bitwise
hash = (hash << 5) - hash + chr;
hash = Math.trunc(hash);
diff --git a/src/app/utils/debug.ts b/src/app/utils/debug.ts
index a02a2b07d..adcb3a8f3 100644
--- a/src/app/utils/debug.ts
+++ b/src/app/utils/debug.ts
@@ -16,7 +16,6 @@ type LogLevel = 'log' | 'warn' | 'error';
const fmt = (namespace: string, level: LogLevel, ...args: unknown[]): void => {
if (!isDebug() && level === 'log') return;
const prefix = `[sable:${namespace}]`;
- // oxlint-disable-next-line no-console
console[level](prefix, ...args);
};
diff --git a/src/app/utils/debugLogger.ts b/src/app/utils/debugLogger.ts
index 57aee3882..88f787328 100644
--- a/src/app/utils/debugLogger.ts
+++ b/src/app/utils/debugLogger.ts
@@ -84,7 +84,6 @@ class DebugLoggerService {
listener(entry);
} catch (error) {
// Silently catch listener errors to prevent debug logging from breaking the app
- // eslint-disable-next-line no-console -- Error logging for debugging
console.error('[DebugLogger] Listener error:', error);
}
});
@@ -123,7 +122,6 @@ class DebugLoggerService {
// Also log to console for developer convenience
const prefix = `[sable:${category}:${namespace}]`;
const consoleLevel = level === 'debug' ? 'log' : level;
- // oxlint-disable-next-line no-console
console[consoleLevel](prefix, message, data !== undefined ? data : '');
}
diff --git a/src/app/utils/room.ts b/src/app/utils/room.ts
index 108c31d40..93fa175bd 100644
--- a/src/app/utils/room.ts
+++ b/src/app/utils/room.ts
@@ -180,7 +180,6 @@ export const getOrphanParents = (roomToParents: RoomToParents, roomId: string):
return Array.from(parents).filter((parentRoomId) => !roomToParents.has(parentRoomId));
};
-// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
export const isMutedRule = (rule: IPushRule) =>
// Check for empty actions (new spec) or dont_notify (deprecated)
(rule.actions.length === 0 || (rule.actions[0] as unknown as string) === 'dont_notify') &&
diff --git a/src/app/utils/sanitize.ts b/src/app/utils/sanitize.ts
index 96446c577..0e56d550c 100644
--- a/src/app/utils/sanitize.ts
+++ b/src/app/utils/sanitize.ts
@@ -288,33 +288,27 @@ export const sanitizeCustomHtml = (customHtml: string): string => {
if (tagName === 'img' && attrName === INTERNAL_IMG_SRC_ATTR) {
if (!protectedSources.has(hookEvent.attrValue)) {
- // oxlint-disable-next-line no-param-reassign
hookEvent.keepAttr = false;
return;
}
- // oxlint-disable-next-line no-param-reassign
hookEvent.forceKeepAttr = true;
return;
}
if (!tagAllowsAttribute(tagName, attrName)) {
// DOMPurify exposes attribute decisions by mutating the hook event.
- // oxlint-disable-next-line no-param-reassign
hookEvent.keepAttr = false;
return;
}
const validatedAttrValue = getValidatedAttributeValue(tagName, attrName, hookEvent.attrValue);
if (validatedAttrValue === undefined) {
- // oxlint-disable-next-line no-param-reassign
hookEvent.keepAttr = false;
return;
}
- // oxlint-disable-next-line no-param-reassign
hookEvent.attrValue = validatedAttrValue;
- // oxlint-disable-next-line no-param-reassign
hookEvent.forceKeepAttr = true;
});
diff --git a/src/client/slidingSync.ts b/src/client/slidingSync.ts
index 22a87e727..83d80e759 100644
--- a/src/client/slidingSync.ts
+++ b/src/client/slidingSync.ts
@@ -1,4 +1,3 @@
-/* oxlint-disable max-classes-per-file */
import type {
Extension,
MatrixClient,
@@ -212,12 +211,10 @@ class ExtensionPresence implements Extension<{ enabled: boolean }, { events?: ob
this.enabled = value;
}
- // oxlint-disable-next-line class-methods-use-this
public name(): string {
return 'presence';
}
- // oxlint-disable-next-line class-methods-use-this
public when(): ExtensionState {
// Run after the main response body has been processed so room/member state is ready.
return ExtensionState.PostProcess;
diff --git a/src/index.tsx b/src/index.tsx
index 0affd62f0..4f6dfb004 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -36,7 +36,6 @@ const showUpdateAvailablePrompt = (registration: ServiceWorkerRegistration) => {
return;
}
- // oxlint-disable-next-line eslint(no-alert) -- PWA update prompt requires browser confirm dialog
if (window.confirm('A new version of the app is available. Refresh to update?')) {
if (registration.waiting) {
// oxlint-disable-next-line unicorn/require-post-message-target-origin
@@ -102,7 +101,6 @@ if ('serviceWorker' in navigator) {
if (data.type === 'token' && data.id) {
const token = localStorage.getItem('cinny_access_token') ?? undefined;
- // oxlint-disable-next-line unicorn/require-post-message-target-origin
ev.source?.postMessage({
replyTo: data.id,
payload: token,
diff --git a/src/instrument.ts b/src/instrument.ts
index 98a89a92e..81fbb81c8 100644
--- a/src/instrument.ts
+++ b/src/instrument.ts
@@ -94,13 +94,11 @@ if (dsn && sentryEnabled) {
if (log.level === 'debug' && environment === 'production') return null;
// Redact Matrix IDs and tokens from the log message string
if (typeof log.message === 'string') {
- // oxlint-disable-next-line no-param-reassign
log.message = scrubMatrixIds(log.message);
}
// Redact Matrix IDs from any string-valued log attributes (e.g. roomId, userId)
// These are flattened from the structured data object and sent as searchable attributes.
if (log.attributes && typeof log.attributes === 'object') {
- // oxlint-disable-next-line no-param-reassign
log.attributes = scrubDataObject(log.attributes) as typeof log.attributes;
}
return log;
@@ -113,7 +111,6 @@ if (dsn && sentryEnabled) {
// React Router normally parameterises routes (e.g. /home/:roomIdOrAlias/) but falls
// back to the raw URL when matching fails, so we scrub defensively here.
if (event.transaction) {
- // oxlint-disable-next-line no-param-reassign
event.transaction = scrubMatrixUrl(event.transaction);
}
@@ -126,7 +123,6 @@ if (dsn && sentryEnabled) {
// For each string value: apply URL scrubbing when the value starts with "http",
// then apply ID scrubbing to catch any remaining bare Matrix IDs.
if (event.spans) {
- // oxlint-disable-next-line no-param-reassign
event.spans = event.spans.map((span) => {
const newDesc = span.description ? scrubMatrixUrl(span.description) : span.description;
const spanData = span.data as Record | undefined;
@@ -217,13 +213,11 @@ if (dsn && sentryEnabled) {
) {
const errcode = (originalException as Record).errcode as string;
// Preserve default grouping AND split by errcode
- // oxlint-disable-next-line no-param-reassign
event.fingerprint = ['{{ default }}', errcode];
}
// Scrub sensitive data from error messages and exception values using shared helpers
if (event.message) {
- // oxlint-disable-next-line no-param-reassign
event.message = scrubMatrixIds(event.message);
}
@@ -231,7 +225,6 @@ if (dsn && sentryEnabled) {
if (event.exception?.values) {
event.exception.values.forEach((exception) => {
if (exception.value) {
- // oxlint-disable-next-line no-param-reassign
exception.value = scrubMatrixUrl(scrubMatrixIds(exception.value));
}
});
@@ -240,13 +233,11 @@ if (dsn && sentryEnabled) {
// Scrub contexts (e.g. debugLog context from captureMessage in debugLogger.ts,
// which can carry structured data fields like roomId, targetEventId, etc.)
if (event.contexts) {
- // oxlint-disable-next-line no-param-reassign
event.contexts = scrubDataObject(event.contexts) as typeof event.contexts;
}
// Scrub request data
if (event.request?.url) {
- // oxlint-disable-next-line no-param-reassign
event.request.url = scrubMatrixUrl(
event.request.url.replace(
/(access_token|password|token)([=:]\s*)([^\s&]+)/gi,
@@ -258,7 +249,6 @@ if (dsn && sentryEnabled) {
// Scrub the transaction name on error events (set when the error occurred during a
// page-load or navigation transaction — raw URL leaks here when route matching fails)
if (event.transaction) {
- // oxlint-disable-next-line no-param-reassign
event.transaction = scrubMatrixUrl(event.transaction);
}
@@ -289,19 +279,14 @@ if (dsn && sentryEnabled) {
// @ts-expect-error - Adding to window for debugging
window.Sentry = Sentry;
- // oxlint-disable-next-line no-console
console.info(
`[Sentry] Initialized for ${environment} environment${replayEnabled ? ' with Session Replay' : ''}`
);
- // oxlint-disable-next-line no-console
console.info(`[Sentry] DSN configured: ${dsn?.substring(0, 30)}...`);
- // oxlint-disable-next-line no-console
console.info(`[Sentry] Release: ${release || 'not set'}`);
} else if (!sentryEnabled) {
- // oxlint-disable-next-line no-console
console.info('[Sentry] Disabled by user preference');
} else {
- // oxlint-disable-next-line no-console
console.info('[Sentry] Disabled - no DSN provided');
}
diff --git a/src/sw.ts b/src/sw.ts
index d5b1f1772..639ae39c0 100644
--- a/src/sw.ts
+++ b/src/sw.ts
@@ -154,7 +154,6 @@ function setSession(clientId: string, accessToken: unknown, baseUrl: unknown, us
sessions.set(clientId, info);
// A real session has arrived — discard the preloaded fallback.
preloadedSession = undefined;
- // eslint-disable-next-line no-console -- Service worker debug logging for session management
console.debug('[SW] setSession: stored', clientId, baseUrl);
// Persist so push-event fetches work after iOS restarts the SW.
persistSession(info).catch(() => undefined);
@@ -162,7 +161,6 @@ function setSession(clientId: string, accessToken: unknown, baseUrl: unknown, us
// Logout or invalid session
sessions.delete(clientId);
preloadedSession = undefined;
- // eslint-disable-next-line no-console -- Service worker debug logging
console.debug('[SW] setSession: removed', clientId);
clearPersistedSession().catch(() => undefined);
}
@@ -196,7 +194,6 @@ async function requestSessionWithTimeout(
): Promise {
const client = await self.clients.get(clientId);
if (!client) {
- // eslint-disable-next-line no-console -- Service worker warning for debugging
console.warn('[SW] requestSessionWithTimeout: client not found', clientId);
return undefined;
}
@@ -205,7 +202,6 @@ async function requestSessionWithTimeout(
const timeout = new Promise((resolve) => {
setTimeout(() => {
- // eslint-disable-next-line no-console -- Service worker warning for debugging
console.warn('[SW] requestSessionWithTimeout: timed out after', timeoutMs, 'ms', clientId);
resolve(undefined);
}, timeoutMs);
@@ -252,13 +248,11 @@ async function fetchRawEvent(
headers: { Authorization: `Bearer ${accessToken}` },
});
if (!res.ok) {
- // eslint-disable-next-line no-console -- Service worker debug logging for HTTP errors
console.warn('[SW fetchRawEvent] HTTP', res.status, 'for', eventId);
return undefined;
}
return (await res.json()) as Record;
} catch (err) {
- // eslint-disable-next-line no-console -- Service worker debug logging for errors
console.warn('[SW fetchRawEvent] error', err);
return undefined;
}
@@ -396,7 +390,6 @@ async function requestDecryptionFromClient(
const timeout = new Promise((resolve) => {
setTimeout(() => {
decryptionPendingMap.delete(eventId);
- // eslint-disable-next-line no-console -- Service worker debug logging for timeout
console.warn('[SW decryptRelay] timed out waiting for client', client.id);
resolve(undefined);
}, 5000);
@@ -409,7 +402,6 @@ async function requestDecryptionFromClient(
});
} catch (err) {
decryptionPendingMap.delete(eventId);
- // eslint-disable-next-line no-console -- Service worker error logging for postMessage failure
console.warn('[SW decryptRelay] postMessage error', err);
return undefined;
}
@@ -438,7 +430,6 @@ async function handleMinimalPushPayload(
if (!session) {
// No session anywhere — app was never opened since install, or the user logged out.
// Show a minimal actionable notification so the user can tap through to the room.
- // eslint-disable-next-line no-console -- Service worker debug logging for push notifications
console.debug('[SW push] minimal payload: no session, showing generic notification');
await self.registration.showNotification('New Message', {
body: undefined,
@@ -740,7 +731,6 @@ self.addEventListener('fetch', (event: FetchEvent) => {
if (persisted && validMediaRequest(url, persisted.baseUrl)) {
return fetch(url, { ...fetchConfig(persisted.accessToken), redirect });
}
- // eslint-disable-next-line no-console -- Service worker warning for media fetch fallback
console.warn(
'[SW fetch] No valid session for media request',
{ url, clientId, hasSession: !!s },
@@ -777,23 +767,19 @@ const onPushNotification = async (event: PushEvent) => {
// because iOS Safari PWA often returns empty or stale results from matchAll().
const hasVisibleClient =
appIsVisible || clients.some((client) => client.visibilityState === 'visible');
- // eslint-disable-next-line no-console -- Service worker debug logging for visibility check
console.debug(
'[SW push] appIsVisible:',
appIsVisible,
'| clients:',
clients.map((c) => ({ url: c.url, visibility: c.visibilityState }))
);
- // eslint-disable-next-line no-console -- Service worker debug logging for visibility check
console.debug('[SW push] hasVisibleClient:', hasVisibleClient);
if (hasVisibleClient) {
- // eslint-disable-next-line no-console -- Service worker debug logging for visibility check
console.debug('[SW push] suppressing OS notification — app is visible');
return;
}
const pushData = event.data.json();
- // eslint-disable-next-line no-console -- Service worker debug logging for push data
console.debug('[SW push] raw payload:', JSON.stringify(pushData, null, 2));
try {
@@ -827,7 +813,6 @@ const onPushNotification = async (event: PushEvent) => {
// event_id_only format: fetch the event ourselves and (for E2EE rooms) try
// to relay decryption to an open app tab.
if (isMinimalPushPayload(pushData)) {
- // eslint-disable-next-line no-console -- Service worker debug logging for minimal payload
console.debug('[SW push] minimal payload detected — fetching event', pushData.event_id);
await handleMinimalPushPayload(pushData.room_id, pushData.event_id, clients);
return;
@@ -853,9 +838,7 @@ self.addEventListener('notificationclick', (event: NotificationEvent) => {
const pushEventId: string | undefined = data?.event_id ?? undefined;
const isInvite = data?.content?.membership === 'invite';
- // eslint-disable-next-line no-console -- Service worker debug logging for notification click
console.debug('[SW notificationclick] notification data:', JSON.stringify(data, null, 2));
- // eslint-disable-next-line no-console -- Service worker debug logging for notification click
console.debug('[SW notificationclick] resolved fields:', {
pushUserId,
pushRoomId,
@@ -891,7 +874,6 @@ self.addEventListener('notificationclick', (event: NotificationEvent) => {
targetUrl = new URL('inbox/notifications/', scope).href;
}
- // eslint-disable-next-line no-console -- Service worker debug logging for notification click
console.debug('[SW notificationclick] targetUrl:', targetUrl);
event.waitUntil(
@@ -901,7 +883,6 @@ self.addEventListener('notificationclick', (event: NotificationEvent) => {
includeUncontrolled: true,
})) as WindowClient[];
- // eslint-disable-next-line no-console -- Service worker debug logging for notification click
console.debug(
'[SW notificationclick] window clients:',
clientList.map((c) => ({
@@ -912,7 +893,6 @@ self.addEventListener('notificationclick', (event: NotificationEvent) => {
);
for (const wc of clientList) {
- // eslint-disable-next-line no-console -- Service worker debug logging for notification click
console.debug('[SW notificationclick] postMessage to existing client:', wc.url);
try {
// Post notification data directly to the running app so its
@@ -931,14 +911,12 @@ self.addEventListener('notificationclick', (event: NotificationEvent) => {
await wc.focus();
return;
} catch (err) {
- // eslint-disable-next-line no-console -- Service worker debug logging for notification click
console.debug('[SW notificationclick] postMessage/focus failed:', err);
}
}
// No existing window clients — open a new window.
// ToRoomEvent handles the /to/ URL on cold launch (account switch + pending atom).
- // eslint-disable-next-line no-console -- Service worker debug logging for notification click
console.debug('[SW notificationclick] falling back to openWindow()', targetUrl);
if (self.clients.openWindow) {
await self.clients.openWindow(targetUrl);
diff --git a/src/sw/pushNotification.ts b/src/sw/pushNotification.ts
index 158e45d84..d6b55edfe 100644
--- a/src/sw/pushNotification.ts
+++ b/src/sw/pushNotification.ts
@@ -55,7 +55,6 @@ export const createPushNotifications = (
silent,
data,
};
- // eslint-disable-next-line no-console -- Service worker debug logging for notifications
console.debug('[SW showNotification] title:', title, '| data:', JSON.stringify(data, null, 2));
await self.registration.showNotification(title, notifOptions as NotificationOptions);
};
@@ -177,7 +176,6 @@ export const createPushNotifications = (
const handlePushNotificationPushData = async (pushData: MatrixPushData) => {
const eventType = pushData?.type as EventType | undefined;
if (!eventType) {
- // eslint-disable-next-line no-console -- Service worker debug logging
console.warn('no event type');
}