diff --git a/biome.jsonc b/biome.jsonc index f7c2a6cd..c86bfabd 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -20,7 +20,6 @@ "rules": { "recommended": true, "style": { - "noUnusedTemplateLiteral": "off", // TODO: turn on, too many cases "noUselessElse": "off", // TODO: turn on, too many cases "noNonNullAssertion": "off" // TODO: turn on, too many cases }, diff --git a/esbuild/prod.ts b/esbuild/prod.ts index 6f1ac088..d814a0ad 100644 --- a/esbuild/prod.ts +++ b/esbuild/prod.ts @@ -103,10 +103,10 @@ function preservePolyfillClassNamesPlugin({ const minifiedName = match[1]; const result = polyfillContent - .replace(definitionRegex, `class MonetizationEvent extends Event`) + .replace(definitionRegex, 'class MonetizationEvent extends Event') .replace( `window.MonetizationEvent=${minifiedName}`, - `window.MonetizationEvent=MonetizationEvent`, + 'window.MonetizationEvent=MonetizationEvent', ) .replaceAll(`new ${minifiedName}`, 'new MonetizationEvent'); diff --git a/src/background/services/background.ts b/src/background/services/background.ts index a984174d..9476a3aa 100644 --- a/src/background/services/background.ts +++ b/src/background/services/background.ts @@ -89,10 +89,10 @@ export class Background { // Firefox <128 will throw saying world: MAIN isn't supported. So, we'll // inject via contentScript later. Injection via contentScript is slow, // but apart from WM detection on page-load, everything else works fine. - if (!error.message.includes(`world`)) { + if (!error.message.includes('world')) { this.logger.error( - `Content script execution world \`MAIN\` not supported by your browser.\n` + - `Check https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/scripting/ExecutionWorld#browser_compatibility for browser compatibility.`, + 'Content script execution world `MAIN` not supported by your browser.\n' + + 'Check https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/scripting/ExecutionWorld#browser_compatibility for browser compatibility.', error, ); } diff --git a/src/background/services/monetization.ts b/src/background/services/monetization.ts index e2666b78..5e0ae73d 100644 --- a/src/background/services/monetization.ts +++ b/src/background/services/monetization.ts @@ -473,7 +473,7 @@ export class MonetizationService { private onKeyRevoked() { this.events.once('open_payments.key_revoked', async () => { - this.logger.warn(`Key revoked. Stopping all payment sessions.`); + this.logger.warn('Key revoked. Stopping all payment sessions.'); this.stopAllSessions(); await this.storage.setState({ key_revoked: true }); this.onKeyRevoked(); // setup listener again once all is done @@ -482,7 +482,7 @@ export class MonetizationService { private onOutOfFunds() { this.events.once('open_payments.out_of_funds', async () => { - this.logger.warn(`Out of funds. Stopping all payment sessions.`); + this.logger.warn('Out of funds. Stopping all payment sessions.'); this.stopAllSessions(); await this.storage.setState({ out_of_funds: true }); this.onOutOfFunds(); // setup listener again once all is done @@ -502,7 +502,7 @@ export class MonetizationService { for (const session of this.tabState.getAllSessions()) { session.stop(); } - this.logger.debug(`All payment sessions stopped.`); + this.logger.debug('All payment sessions stopped.'); } async getPopupData(tab: Pick): Promise { diff --git a/src/content/keyAutoAdd/chimoney.ts b/src/content/keyAutoAdd/chimoney.ts index cdcc2a3b..f6faa025 100644 --- a/src/content/keyAutoAdd/chimoney.ts +++ b/src/content/keyAutoAdd/chimoney.ts @@ -53,7 +53,7 @@ const findWallet: Run<{ walletAddressId: string }> = async ( match(el) { const prefix = walletAddress.hostname; const text = el.textContent?.trim() ?? ''; - return text.startsWith(`Wallet Address:`) && text.includes(prefix); + return text.startsWith('Wallet Address:') && text.includes(prefix); }, }).catch(() => { throw new Error( diff --git a/src/content/keyAutoAdd/lib/helpers.ts b/src/content/keyAutoAdd/lib/helpers.ts index de6e3345..df055b4f 100644 --- a/src/content/keyAutoAdd/lib/helpers.ts +++ b/src/content/keyAutoAdd/lib/helpers.ts @@ -67,7 +67,7 @@ export async function waitForURL( const abortSignal = AbortSignal.timeout(timeout); abortSignal.addEventListener('abort', (e) => { observer.disconnect(); - reject(new TimeoutError(`Timeout waiting for URL`, { cause: e })); + reject(new TimeoutError('Timeout waiting for URL', { cause: e })); }); let url = window.location.href; diff --git a/src/content/polyfill.ts b/src/content/polyfill.ts index 9439728f..8f189dd5 100644 --- a/src/content/polyfill.ts +++ b/src/content/polyfill.ts @@ -87,7 +87,8 @@ import type { MonetizationEventPayload } from '@/shared/messages'; get detail() { if (!eventDetailDeprecationEmitted) { - const msg = `MonetizationEvent.detail is deprecated. Access attributes directly instead.`; + const msg = + 'MonetizationEvent.detail is deprecated. Access attributes directly instead.'; // biome-ignore lint/suspicious/noConsole: warning meant for website devs console.warn(msg); eventDetailDeprecationEmitted = true; diff --git a/src/pages/shared/components/ui/RadioGroup.tsx b/src/pages/shared/components/ui/RadioGroup.tsx index c86ab7c3..14fec0aa 100644 --- a/src/pages/shared/components/ui/RadioGroup.tsx +++ b/src/pages/shared/components/ui/RadioGroup.tsx @@ -54,9 +54,7 @@ export const Radio = ({ />