From 44eab895e4effebdae437842cdd21b79fe771aff Mon Sep 17 00:00:00 2001 From: Yanzhen Yu Date: Wed, 1 Apr 2026 12:00:00 +0800 Subject: [PATCH] fix lint --- packages/rrweb-snapshot/src/snapshot.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/rrweb-snapshot/src/snapshot.ts b/packages/rrweb-snapshot/src/snapshot.ts index 9aae55cb..6c6e136e 100644 --- a/packages/rrweb-snapshot/src/snapshot.ts +++ b/packages/rrweb-snapshot/src/snapshot.ts @@ -10,10 +10,8 @@ import { MaskTextFn, MaskInputFn, KeepIframeSrcFn, - documentNode, } from './types'; import { isElement, isShadowRoot, maskInputValue } from './utils'; -import { values } from 'puppeteer/DeviceDescriptors'; let _id = 1; const tagNameRegex = new RegExp('[^a-z0-9-_:]'); @@ -55,7 +53,9 @@ function getCssRuleString(rule: CSSRule): string { if (isCSSImportRule(rule)) { try { cssStringified = getCssRulesString(rule.styleSheet) || cssStringified; - } catch {} + } catch { + // ignore + } } return cssStringified; } @@ -136,8 +136,8 @@ function getAbsoluteSrcsetString(doc: Document, attributeValue: string) { let pos = 0; function collectCharacters(regEx: RegExp) { - var chars, - match = regEx.exec(attributeValue.substring(pos)); + let chars: string; + let match = regEx.exec(attributeValue.substring(pos)); if (match) { chars = match[0]; pos += chars.length;