aboutsummaryrefslogtreecommitdiff
path: root/ext/js/core
diff options
context:
space:
mode:
authorJames Maa <jmaa@berkeley.edu>2024-05-31 08:06:52 -0700
committerGitHub <noreply@github.com>2024-05-31 15:06:52 +0000
commit76ca08bd59f0e8bfa1bb20ac813f48e7ab241265 (patch)
treebdba43d9ba704885383c7f308c6fe3f574c647c5 /ext/js/core
parentb3f54747eb2694bdc90bce72e5532e99d374ef08 (diff)
Allow trailing commas in ESLint (#1013)
* Update comma-dangle rule * Fix dangling commas
Diffstat (limited to 'ext/js/core')
-rw-r--r--ext/js/core/api-map.js2
-rw-r--r--ext/js/core/extension-error.js4
-rw-r--r--ext/js/core/fetch-utilities.js2
-rw-r--r--ext/js/core/utilities.js2
4 files changed, 5 insertions, 5 deletions
diff --git a/ext/js/core/api-map.js b/ext/js/core/api-map.js
index 727c5730..e03de874 100644
--- a/ext/js/core/api-map.js
+++ b/ext/js/core/api-map.js
@@ -80,7 +80,7 @@ export function invokeApiMapHandler(map, name, params, extraParams, callback, ha
if (promiseOrResult instanceof Promise) {
/** @type {Promise<unknown>} */ (promiseOrResult).then(
(result) => { callback({result}); },
- (error) => { callback({error: ExtensionError.serialize(error)}); }
+ (error) => { callback({error: ExtensionError.serialize(error)}); },
);
return true;
} else {
diff --git a/ext/js/core/extension-error.js b/ext/js/core/extension-error.js
index 6458f477..56f0a0d9 100644
--- a/ext/js/core/extension-error.js
+++ b/ext/js/core/extension-error.js
@@ -49,7 +49,7 @@ export class ExtensionError extends Error {
const result = {
name: typeof name === 'string' ? name : '',
message: typeof message === 'string' ? message : '',
- stack: typeof stack === 'string' ? stack : ''
+ stack: typeof stack === 'string' ? stack : '',
};
if (error instanceof ExtensionError) {
result.data = error.data;
@@ -61,7 +61,7 @@ export class ExtensionError extends Error {
}
return /** @type {import('core').SerializedError2} */ ({
value: error,
- hasValue: true
+ hasValue: true,
});
}
diff --git a/ext/js/core/fetch-utilities.js b/ext/js/core/fetch-utilities.js
index ccd8a305..25df6eca 100644
--- a/ext/js/core/fetch-utilities.js
+++ b/ext/js/core/fetch-utilities.js
@@ -28,7 +28,7 @@ async function fetchAsset(url) {
cache: 'default',
credentials: 'omit',
redirect: 'follow',
- referrerPolicy: 'no-referrer'
+ referrerPolicy: 'no-referrer',
});
if (!response.ok) {
throw new Error(`Failed to fetch ${url}: ${response.status}`);
diff --git a/ext/js/core/utilities.js b/ext/js/core/utilities.js
index 1428a744..42b11884 100644
--- a/ext/js/core/utilities.js
+++ b/ext/js/core/utilities.js
@@ -249,7 +249,7 @@ export function deferPromise() {
return {
promise,
resolve: /** @type {(value: T) => void} */ (resolve),
- reject: /** @type {(reason?: import('core').RejectionReason) => void} */ (reject)
+ reject: /** @type {(reason?: import('core').RejectionReason) => void} */ (reject),
};
}