[build] upgrade eslint to 9.37.0 (#88)

Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Reviewed-on: https://codeberg.org/superseriousbusiness/masto-fe-standalone/pulls/88
Co-authored-by: Zoë Bijl <moiety@noreply.codeberg.org>
Co-committed-by: Zoë Bijl <moiety@noreply.codeberg.org>
This commit is contained in:
Zoë Bijl
2025-10-12 13:42:02 +02:00
committed by tobi
parent 75d7a62693
commit 1ff70886a1
975 changed files with 22196 additions and 21964 deletions
@@ -1,17 +1,17 @@
import 'core-js/features/object/assign';
import 'core-js/features/object/values';
import 'core-js/features/symbol';
import 'core-js/features/promise/finally';
import { decode as decodeBase64 } from '../utils/base64';
import "core-js/features/object/assign";
import "core-js/features/object/values";
import "core-js/features/symbol";
import "core-js/features/promise/finally";
import { decode as decodeBase64 } from "../utils/base64";
if (!Object.hasOwn(HTMLCanvasElement.prototype, 'toBlob')) {
const BASE64_MARKER = ';base64,';
if (!Object.hasOwn(HTMLCanvasElement.prototype, "toBlob")) {
const BASE64_MARKER = ";base64,";
Object.defineProperty(HTMLCanvasElement.prototype, 'toBlob', {
Object.defineProperty(HTMLCanvasElement.prototype, "toBlob", {
value: function (
this: HTMLCanvasElement,
callback: BlobCallback,
type = 'image/png',
type = "image/png",
quality: unknown,
) {
const dataURL: string = this.toDataURL(type, quality);
@@ -21,7 +21,7 @@ if (!Object.hasOwn(HTMLCanvasElement.prototype, 'toBlob')) {
const [, base64] = dataURL.split(BASE64_MARKER);
data = decodeBase64(base64);
} else {
[, data] = dataURL.split(',');
[, data] = dataURL.split(",");
}
callback(new Blob([data], { type }));
@@ -1,2 +1,2 @@
import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only';
import 'requestidlecallback';
import "abortcontroller-polyfill/dist/abortcontroller-polyfill-only";
import "requestidlecallback";
+9 -9
View File
@@ -2,23 +2,23 @@
// If there are no polyfills, then this is just Promise.resolve() which means
// it will execute in the same tick of the event loop (i.e. near-instant).
import { loadIntlPolyfills } from './intl';
import { loadIntlPolyfills } from "./intl";
function importBasePolyfills() {
return import(/* webpackChunkName: "base_polyfills" */ './base_polyfills');
return import(/* webpackChunkName: "base_polyfills" */ "./base_polyfills");
}
function importExtraPolyfills() {
return import(/* webpackChunkName: "extra_polyfills" */ './extra_polyfills');
return import(/* webpackChunkName: "extra_polyfills" */ "./extra_polyfills");
}
export function loadPolyfills() {
const needsBasePolyfills = !(
'toBlob' in HTMLCanvasElement.prototype &&
'assign' in Object &&
'values' in Object &&
'Symbol' in window &&
'finally' in Promise.prototype
"toBlob" in HTMLCanvasElement.prototype &&
"assign" in Object &&
"values" in Object &&
"Symbol" in window &&
"finally" in Promise.prototype
);
// Latest version of Firefox and Safari do not have IntersectionObserver.
@@ -29,7 +29,7 @@ export function loadPolyfills() {
window.AbortController &&
window.IntersectionObserver &&
window.IntersectionObserverEntry &&
'isIntersecting' in IntersectionObserverEntry.prototype &&
"isIntersecting" in IntersectionObserverEntry.prototype &&
window.requestIdleCallback
);
/* eslint-enable @typescript-eslint/no-unnecessary-condition */
+5 -5
View File
@@ -1,6 +1,6 @@
// import { shouldPolyfill as shouldPolyfillCanonicalLocales } from '@formatjs/intl-getcanonicallocales/should-polyfill';
// import { shouldPolyfill as shouldPolyfillLocale } from '@formatjs/intl-locale/should-polyfill';
import { shouldPolyfill as shoudPolyfillPluralRules } from '@formatjs/intl-pluralrules/should-polyfill';
import { shouldPolyfill as shoudPolyfillPluralRules } from "@formatjs/intl-pluralrules/should-polyfill";
// import { shouldPolyfill as shouldPolyfillNumberFormat } from '@formatjs/intl-numberformat/should-polyfill';
// import { shouldPolyfill as shouldPolyfillIntlDateTimeFormat } from '@formatjs/intl-datetimeformat/should-polyfill';
// import { shouldPolyfill as shouldPolyfillIntlRelativeTimeFormat } from '@formatjs/intl-relativetimeformat/should-polyfill';
@@ -55,10 +55,10 @@ async function loadIntlPluralRulesPolyfills(locale: string) {
}
// Load the polyfill 1st BEFORE loading data
await import(
/* webpackChunkName: "i18n-pluralrules-polyfill" */ '@formatjs/intl-pluralrules/polyfill-force'
/* webpackChunkName: "i18n-pluralrules-polyfill" */ "@formatjs/intl-pluralrules/polyfill-force",
);
await import(
/* webpackChunkName: "i18n-pluralrules-polyfill-[request]" */ `@formatjs/intl-pluralrules/locale-data/${unsupportedLocale}`
/* webpackChunkName: "i18n-pluralrules-polyfill-[request]" */ `@formatjs/intl-pluralrules/locale-data/${unsupportedLocale}`,
);
}
@@ -80,8 +80,8 @@ async function loadIntlPluralRulesPolyfills(locale: string) {
// }
export async function loadIntlPolyfills() {
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- we want to match empty strings
const locale = document.querySelector('html')?.lang || 'en';
const locale = document.querySelector("html")?.lang || "en";
// order is important here