[Glitch] Upgrade to typescript-eslint v6
				
					
				
			Port a7253075d1 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
			
			
This commit is contained in:
		@@ -4,7 +4,7 @@ import 'core-js/features/symbol';
 | 
			
		||||
import 'core-js/features/promise/finally';
 | 
			
		||||
import { decode as decodeBase64 } from '../utils/base64';
 | 
			
		||||
 | 
			
		||||
if (!HTMLCanvasElement.prototype.toBlob) {
 | 
			
		||||
if (!Object.hasOwn(HTMLCanvasElement.prototype, 'toBlob')) {
 | 
			
		||||
  const BASE64_MARKER = ';base64,';
 | 
			
		||||
 | 
			
		||||
  Object.defineProperty(HTMLCanvasElement.prototype, 'toBlob', {
 | 
			
		||||
@@ -17,7 +17,7 @@ if (!HTMLCanvasElement.prototype.toBlob) {
 | 
			
		||||
      const dataURL: string = this.toDataURL(type, quality);
 | 
			
		||||
      let data;
 | 
			
		||||
 | 
			
		||||
      if (dataURL.indexOf(BASE64_MARKER) >= 0) {
 | 
			
		||||
      if (dataURL.includes(BASE64_MARKER)) {
 | 
			
		||||
        const [, base64] = dataURL.split(BASE64_MARKER);
 | 
			
		||||
        data = decodeBase64(base64);
 | 
			
		||||
      } else {
 | 
			
		||||
 
 | 
			
		||||
@@ -24,6 +24,7 @@ export function loadPolyfills() {
 | 
			
		||||
  // Latest version of Firefox and Safari do not have IntersectionObserver.
 | 
			
		||||
  // Edge does not have requestIdleCallback.
 | 
			
		||||
  // This avoids shipping them all the polyfills.
 | 
			
		||||
  /* eslint-disable @typescript-eslint/no-unnecessary-condition -- those properties might not exist in old browsers, even if they are always here in types */
 | 
			
		||||
  const needsExtraPolyfills = !(
 | 
			
		||||
    window.AbortController &&
 | 
			
		||||
    window.IntersectionObserver &&
 | 
			
		||||
@@ -31,6 +32,7 @@ export function loadPolyfills() {
 | 
			
		||||
    'isIntersecting' in IntersectionObserverEntry.prototype &&
 | 
			
		||||
    window.requestIdleCallback
 | 
			
		||||
  );
 | 
			
		||||
  /* eslint-enable @typescript-eslint/no-unnecessary-condition */
 | 
			
		||||
 | 
			
		||||
  return Promise.all([
 | 
			
		||||
    loadIntlPolyfills(),
 | 
			
		||||
 
 | 
			
		||||
@@ -80,6 +80,7 @@ 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';
 | 
			
		||||
 | 
			
		||||
  // order is important here
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user