aboutsummaryrefslogtreecommitdiff
path: root/ext/js/background
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2024-02-16 19:37:01 -0500
committerGitHub <noreply@github.com>2024-02-17 00:37:01 +0000
commit4e77741d22778bd09b772fc53f1cbd64107e3d24 (patch)
treee8010d42ccba5341afd98177d3c1d69d856cbcbd /ext/js/background
parent1e69210b53151f31140bb1fbdc9f3d71fa181630 (diff)
Even more eslint rules (#696)
* capitalized-comments * Turn rules on * Add miscellaneous rules * More rules
Diffstat (limited to 'ext/js/background')
-rw-r--r--ext/js/background/backend.js6
-rw-r--r--ext/js/background/offscreen-proxy.js2
-rw-r--r--ext/js/background/profile-conditions-util.js2
3 files changed, 5 insertions, 5 deletions
diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js
index 8ab56232..e246f0bb 100644
--- a/ext/js/background/backend.js
+++ b/ext/js/background/backend.js
@@ -437,7 +437,7 @@ export class Backend {
/** @type {import('api').ApiHandler<'requestBackendReadySignal'>} */
_onApiRequestBackendReadySignal(_params, sender) {
- // tab ID isn't set in background (e.g. browser_action)
+ // Tab ID isn't set in background (e.g. browser_action)
/** @type {import('application').ApiMessage<'applicationBackendReady'>} */
const data = {action: 'applicationBackendReady'};
if (typeof sender.tab === 'undefined') {
@@ -1547,7 +1547,7 @@ export class Backend {
return (
isObject(chrome.action) &&
typeof chrome.action.getTitle === 'function' ?
- new Promise((resolve) => chrome.action.getTitle({}, resolve)) :
+ new Promise((resolve) => { chrome.action.getTitle({}, resolve); }) :
Promise.resolve('')
);
}
@@ -2601,7 +2601,7 @@ export class Backend {
const match = /^\d+/.exec(version);
if (match === null) { return; }
- const versionNumber = Number.parseInt(match[0]);
+ const versionNumber = Number.parseInt(match[0], 10);
if (!(Number.isFinite(versionNumber) && versionNumber >= 77)) { return; }
await navigator.storage.persist();
diff --git a/ext/js/background/offscreen-proxy.js b/ext/js/background/offscreen-proxy.js
index 085048c1..5a79f41a 100644
--- a/ext/js/background/offscreen-proxy.js
+++ b/ext/js/background/offscreen-proxy.js
@@ -85,7 +85,7 @@ export class OffscreenProxy {
*/
async _hasOffscreenDocument() {
const offscreenUrl = chrome.runtime.getURL('offscreen.html');
- if (!chrome.runtime.getContexts) { // chrome version below 116
+ if (!chrome.runtime.getContexts) { // Chrome version below 116
// Clients: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/clients
// @ts-expect-error - Types not set up for service workers yet
const matchedClients = await clients.matchAll();
diff --git a/ext/js/background/profile-conditions-util.js b/ext/js/background/profile-conditions-util.js
index e2d58725..4e4e38d7 100644
--- a/ext/js/background/profile-conditions-util.js
+++ b/ext/js/background/profile-conditions-util.js
@@ -229,7 +229,7 @@ function createSchemaPopupLevelGreaterThanOrEqual(value) {
};
}
-// url schema creation functions
+// URL schema creation functions
/**
* @param {string} value