diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2023-12-16 20:04:56 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-17 01:04:56 +0000 |
commit | b249627434d3a94420ac4d98c3ce720767e57b43 (patch) | |
tree | ec46e2c020c5a63a5c2babf56376f53e288ed7f2 /ext/js/background/backend.js | |
parent | decbc60f7734e739c0e5c41da294f65f9eec92fe (diff) |
Update eslint spacing rules (#366)
* Add space-infix-ops rule
* Add no-multi-spaces
---------
Co-authored-by: Darius Jahandarie <djahandarie@gmail.com>
Diffstat (limited to 'ext/js/background/backend.js')
-rw-r--r-- | ext/js/background/backend.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js index 3eefed53..749c81a6 100644 --- a/ext/js/background/backend.js +++ b/ext/js/background/backend.js @@ -147,6 +147,7 @@ export class Backend { /** @type {PermissionsUtil} */ this._permissionsUtil = new PermissionsUtil(); + /* eslint-disable no-multi-spaces */ /** @type {import('backend').MessageHandlerMap} */ this._messageHandlers = new Map(/** @type {import('backend').MessageHandlerMapInit} */ ([ ['requestBackendReadySignal', {async: false, contentScript: true, handler: this._onApiRequestBackendReadySignal.bind(this)}], @@ -193,6 +194,7 @@ export class Backend { ['loadExtensionScripts', {async: true, contentScript: true, handler: this._onApiLoadExtensionScripts.bind(this)}], ['openCrossFramePort', {async: false, contentScript: true, handler: this._onApiOpenCrossFramePort.bind(this)}] ])); + /* eslint-enable no-multi-spaces */ /** @type {import('backend').MessageHandlerWithProgressMap} */ this._messageHandlersWithProgress = new Map(/** @type {import('backend').MessageHandlerWithProgressMapInit} */ ([ // Empty @@ -201,10 +203,10 @@ export class Backend { /** @type {Map<string, (params?: import('core').SerializableObject) => void>} */ this._commandHandlers = new Map(/** @type {[name: string, handler: (params?: import('core').SerializableObject) => void][]} */ ([ ['toggleTextScanning', this._onCommandToggleTextScanning.bind(this)], - ['openInfoPage', this._onCommandOpenInfoPage.bind(this)], - ['openSettingsPage', this._onCommandOpenSettingsPage.bind(this)], - ['openSearchPage', this._onCommandOpenSearchPage.bind(this)], - ['openPopupWindow', this._onCommandOpenPopupWindow.bind(this)] + ['openInfoPage', this._onCommandOpenInfoPage.bind(this)], + ['openSettingsPage', this._onCommandOpenSettingsPage.bind(this)], + ['openSearchPage', this._onCommandOpenSearchPage.bind(this)], + ['openPopupWindow', this._onCommandOpenPopupWindow.bind(this)] ])); } @@ -805,7 +807,7 @@ export class Backend { } /** @type {import('api').Handler<import('api').GetOrCreateSearchPopupDetails, import('api').GetOrCreateSearchPopupResult>} */ - async _onApiGetOrCreateSearchPopup({focus=false, text}) { + async _onApiGetOrCreateSearchPopup({focus = false, text}) { const {tab, created} = await this._getOrCreateSearchPopup(); if (focus === true || (focus === 'ifCreated' && created)) { await this._focusTab(tab); @@ -1979,7 +1981,7 @@ export class Backend { * @param {?number} [timeout=null] * @returns {Promise<void>} */ - _waitUntilTabFrameIsReady(tabId, frameId, timeout=null) { + _waitUntilTabFrameIsReady(tabId, frameId, timeout = null) { return new Promise((resolve, reject) => { /** @type {?import('core').Timeout} */ let timer = null; |