From bc07aa9af32878a782a3f5fcaa704ebd5de209db Mon Sep 17 00:00:00 2001 From: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> Date: Thu, 23 Mar 2023 23:23:54 -0600 Subject: [PATCH] fix(mv3): :rotating_light: Fix Lint --- add-on/src/background/background.js | 3 ++- add-on/src/lib/ipfs-companion.js | 6 +++--- add-on/src/recovery/recovery.js | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/add-on/src/background/background.js b/add-on/src/background/background.js index 65aff9c34..54d4f842e 100644 --- a/add-on/src/background/background.js +++ b/add-on/src/background/background.js @@ -13,4 +13,5 @@ browser.runtime.setUninstallURL(getUninstallURL(browser)) const init = async () => { await createIpfsCompanion() } -init(); + +init() diff --git a/add-on/src/lib/ipfs-companion.js b/add-on/src/lib/ipfs-companion.js index 5fb11cecd..a69cfc8e6 100644 --- a/add-on/src/lib/ipfs-companion.js +++ b/add-on/src/lib/ipfs-companion.js @@ -108,7 +108,7 @@ export default async function init (windowedContext = false) { throw new Error('IPFS Companion: API client is disabled') } - function registerListeners() { + function registerListeners () { const onBeforeSendInfoSpec = ['requestHeaders'] if (browser.webRequest.OnBeforeSendHeadersOptions && 'EXTRA_HEADERS' in browser.webRequest.OnBeforeSendHeadersOptions) { // Chrome 72+ requires 'extraHeaders' for accessing all headers @@ -263,7 +263,7 @@ export default async function init (windowedContext = false) { }, 0) } } - info.currentDnslinkFqdn =await dnslinkResolver.findDNSLinkHostname(url) + info.currentDnslinkFqdn = await dnslinkResolver.findDNSLinkHostname(url) info.currentFqdn = info.currentDnslinkFqdn || safeHostname(url) info.currentTabIntegrationsOptOut = !state.activeIntegrations(info.currentFqdn) info.isRedirectContext = info.currentFqdn && ipfsPathValidator.isRedirectPageActionsContext(url) @@ -517,7 +517,7 @@ export default async function init (windowedContext = false) { // Try SVG first -- Firefox supports it natively await browser.action.setIcon(iconDefinition) if (browser.runtime.lastError.message === 'Icon invalid.') { - throw browser.runtime.lastError + throw browser.runtime.lastError } } catch (error) { // Fallback! diff --git a/add-on/src/recovery/recovery.js b/add-on/src/recovery/recovery.js index 18b433f72..822d60fee 100644 --- a/add-on/src/recovery/recovery.js +++ b/add-on/src/recovery/recovery.js @@ -3,7 +3,7 @@ import choo from 'choo' import html from 'choo/html/index.js' -import browser, { i18n, runtime } from 'webextension-polyfill' +import { i18n, runtime } from 'webextension-polyfill' import { nodeOffSvg } from '../landing-pages/welcome/page.js' import createWelcomePageStore from '../landing-pages/welcome/store.js' import { optionsPage } from '../lib/constants.js'