This commit is contained in:
Peter Steinberger 2025-06-23 15:28:03 +02:00
parent 0a349e72dd
commit ed9ea0e373
4 changed files with 17 additions and 4 deletions

View file

@ -14,7 +14,7 @@ module.exports = tseslint.config(
files: ['src/**/*.ts', 'src/**/*.tsx'],
languageOptions: {
parserOptions: {
project: ['./tsconfig.json', './tsconfig.client.json'],
project: ['./tsconfig.json', './tsconfig.client.json', './tsconfig.sw.json', './tsconfig.test.json'],
tsconfigRootDir: __dirname,
},
},

View file

@ -168,7 +168,7 @@ async function handlePushNotification(payload: PushNotificationPayload): Promise
tag: tag || `${NOTIFICATION_TAG_PREFIX}${data.type}-${Date.now()}`,
requireInteraction: requireInteraction || data.type === 'session-error',
silent: false,
// @ts-ignore - renotify is a valid option but not in TypeScript types
// @ts-expect-error - renotify is a valid option but not in TypeScript types
renotify: true,
actions: actions || getDefaultActions(data),
timestamp: data.timestamp,
@ -176,7 +176,7 @@ async function handlePushNotification(payload: PushNotificationPayload): Promise
// Add vibration pattern for mobile devices
if ('vibrate' in navigator) {
// @ts-ignore - vibrate is a valid option but not in TypeScript types
// @ts-expect-error - vibrate is a valid option but not in TypeScript types
notificationOptions.vibrate = getVibrationPattern(data.type);
}
@ -402,7 +402,7 @@ async function queueNotification(payload: PushNotificationPayload): Promise<void
// Register for background sync
try {
// @ts-ignore - sync is part of Background Sync API
// @ts-expect-error - sync is part of Background Sync API
await self.registration.sync.register('notification-sync');
} catch (error) {
console.warn('[SW] Background sync not supported:', error);

View file

@ -323,9 +323,11 @@ export class PtyManager extends EventEmitter {
logger.debug(`Bell data in session ${session.id}: ${JSON.stringify(data)}`);
// Count total bells and OSC-terminated bells
// eslint-disable-next-line no-control-regex
const totalBells = (data.match(/\x07/g) || []).length;
// Count OSC sequences terminated with bell: \x1b]...\x07
// eslint-disable-next-line no-control-regex
const oscMatches = data.match(/\x1b]([^\x07\x1b]|\x1b[^]])*\x07/g) || [];
const oscTerminatedBells = oscMatches.length;

11
web/tsconfig.test.json Normal file
View file

@ -0,0 +1,11 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"types": ["vitest/globals"]
},
"include": [
"src/**/*.test.ts",
"src/**/*.spec.ts",
"src/test/**/*"
]
}