Selaa lähdekoodia

fix: lint errors

Sv443 3 kuukautta sitten
vanhempi
commit
14a9143f1b
2 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 2 2
      lib/dom.ts
  2. 1 1
      tools/post-build-global.mts

+ 2 - 2
lib/dom.ts

@@ -6,7 +6,7 @@ export function getUnsafeWindow(): Window {
     // throws ReferenceError if the "@grant unsafeWindow" isn't present
     return unsafeWindow;
   }
-  catch(e) {
+  catch {
     return window;
   }
 }
@@ -67,7 +67,7 @@ export function openInNewTab(href: string, background?: boolean, additionalProps
   try {
     GM.openInTab?.(href, background);
   }
-  catch(e) {
+  catch {
     const openElem = document.createElement("a");
     Object.assign(openElem, {
       className: "userutils-open-in-new-tab",

+ 1 - 1
tools/post-build-global.mts

@@ -55,7 +55,7 @@ async function exists(path: string, mode = fsconstants.R_OK | fsconstants.W_OK)
     await access(path, mode);
     return true;
   }
-  catch(err) {
+  catch {
     return false;
   }
 }